-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the class FIRMessagingRmq2PersistentStore #4045
Conversation
…alling the same functions in FIRMessagingRmq2PersistentStore
#if defined(DEBUG) | ||
#define FIRMesssaging_MUST_NOT_BE_MAIN_THREAD() \ | ||
do { \ | ||
NSAssert(![NSThread isMainThread], @"Must not be executing on the main thread."); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though it's debug-only, this assert may trigger false-positives if the main GCD queue is suspended. See http://blog.benjamin-encz.de/post/main-queue-vs-main-thread/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed it for now. Also realize we don't set DEBUG flag anymore so this would be barely used.
The file FIRMessagingRmqManager is essentially calling the same functions of FIRMessagingRmq2PersistentStore, that becomes an unnecessary class layer.
Merging FIRMessagingRmq2PersistentStore into FIRMessagingRmqManager and remove the file FIRMessagingRmq2PersistentStore.
This is a clean up before fixing the issue: b/142357385
We need to move database operations off main thread and by reducing the unnecessary class layer helps us adding async call in the next PR.
minor: remove removeRmqMessagesWithRmqId: method as it's only used in test.