Open
Description
We need to consider a cleaner way to support thread safety of FIRApp
. It was brought up as a result of #2639 (see related issue, discussions and history)
Right now @synchronized(self)
is used for this purpose. The main disadvantages of this approach is:
- it requires extra attention from a developer modifying the class. It is easy to miss when new logic is implemented. In fact, the original issue happened juts because some places where missed
In addition:
- it may lead to unintentional blocking of main thread by a background task
- it is possible to introduce a deadlock