Firebase asynchronous function, what's in the background queue and what's not

前端 未结 1 1156
青春惊慌失措
青春惊慌失措 2020-12-03 23:59

Lets say I have this

// a bunch of code...  
FIRDatabase.database.reference.child(\"somechild\").observeSingleEventOfType(.Value, withBlock{(snapshot) in           


        
相关标签:
1条回答
  • 2020-12-04 00:44

    That's indeed how the Firebase Database client works: all network and disk I/O happen off the main thread, then your callbacks/blocks are invoked on the main thread.

    0 讨论(0)
提交回复
热议问题