Alright, thanks Jens. I'm still unclear about how to proceed, but it's not your job to teach me about concurrency! I'll post back here if I need specifics about CBL.
On Saturday, June 11, 2016 at 1:10:49 PM UTC-7, Jens Alfke wrote: > > > On Jun 10, 2016, at 5:16 PM, Phil Mitchell <[email protected] > <javascript:>> wrote: > > So if I'm understanding you, once I set dispatchQueue, my async calls > (explicit dispatch_async()) will work fine, as long as they are dispatched > to the same queue. But dispatching to a global queue OR my blocking calls > from main queue may be unreliable. > > > I’m not quite following your questions. > > The restriction is that you can only call a CBL object (I’m talking about > direct method calls / property accesses) if you’re on the CBLManager’s > dispatch queue. That’s it. > > *How* you get your code to run on that queue is up to you. Generally > you’d use dispatch_async or dispatch_sync to do it. You can also call > -[CBLDatabase doAsync:] — this is basically a shortcut for using > dispatch_async, and can be called from any thread (yes it’s an exception to > the above rule.) > > —Jens > -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/b92e70eb-06fb-43ca-9172-94d296809b6c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
