Sorry, I guess I still don't really understand this. What I'm trying to support is two use cases:
1. Blocking calls from main queue: most classes call into the data store (on the main queue) and wait for a response;
2. Async calls dispatched to background queue: occasionally a class needs to run a longer job on a background thread.
But the caller may be quite removed from the store (many intervening classes), so I don't want the call into the store to have to specify which it is.
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.
Is that correct? And if so, would you advise (internally to the store) wrapping all CBL calls in an explicit dispatch_sync() onto the given dispatchQueue, which would take care of the blocking calls. And the async calls would also work, since they would simply wrap around the sync calls? That would hide everything from callers from the main queue.
—Jens