Эх сурвалжийг харах

Added a note to the queue class, about how it would be awesome to use DISPATCH_QUEUE_CONCURRENT + dispatch_barrier_async some day.

August Mueller 14 жил өмнө
parent
commit
626fa9e93a
1 өөрчлөгдсөн 13 нэмэгдсэн , 1 устгасан
  1. 13 1
      src/FMDatabaseQueue.m

+ 13 - 1
src/FMDatabaseQueue.m

@@ -9,7 +9,19 @@
 #import "FMDatabaseQueue.h"
 #import "FMDatabase.h"
 
-// Note: we call [self retain]; before using dispatch_sync, just incase FMDatabaseQueue is released on another thread and we're in the middle of doing something in dispatch_sync
+/*
+ 
+ Note: we call [self retain]; before using dispatch_sync, just incase 
+ FMDatabaseQueue is released on another thread and we're in the middle of doing
+ something in dispatch_sync
+ 
+ Another Note:
+ Some day, I think it would be awesome to add support for creating a queue with
+ DISPATCH_QUEUE_CONCURRENT, and then make  dispatch_barrier_async the default
+ way to execute things- but give the option to use dispatch_sync for cases where
+ we know we're going to make read only operations for the database.
+
+ */
 
 @implementation FMDatabaseQueue