diff options
Diffstat (limited to 'Firestore/Source/Util/FSTDispatchQueue.h')
-rw-r--r-- | Firestore/Source/Util/FSTDispatchQueue.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Firestore/Source/Util/FSTDispatchQueue.h b/Firestore/Source/Util/FSTDispatchQueue.h index 7922600..8e9273c 100644 --- a/Firestore/Source/Util/FSTDispatchQueue.h +++ b/Firestore/Source/Util/FSTDispatchQueue.h @@ -75,6 +75,14 @@ typedef NS_ENUM(NSInteger, FSTTimerID) { - (void)verifyIsCurrentQueue; /** + * Declares that we are already executing on the correct dispatch_queue_t and would like to + * officially execute code on behalf of this FSTDispatchQueue. To be used only when called back + * by some other API directly onto our queue. This allows us to safely dispatch directly onto the + * worker queue without destroying the invariants this class helps us maintain. + */ +- (void)enterCheckedOperation:(void (^)(void))block; + +/** * Same as dispatch_async() except it asserts that we're not already on the queue, since this * generally indicates a bug (and can lead to re-ordering of operations, etc). * |