DatabaseWriter documentation

This commit is contained in:
Gwendal Roué committed 2016-03-29 13:10:11 +02:00
1 parent 66fe22d716
commit 7b5088b921
1 file changed
+4 -3
+4 -3
View File
@@ -55,11 +55,12 @@ public protocol DatabaseWriter : DatabaseReader {
/// DatabasePool.readFromWrite runs *block* asynchronously in a concurrent
/// reader dispatch queue, and release the writing dispatch queue early,
/// before the block has finished. In the example above, the insertion runs
/// concurrently with the select.
/// concurrently with the select (and yet the select is guaranteed not to
/// see the insertion).
///
/// DatabaseQueue.readFromWrite simply runs *block* synchronously, and
/// returns when the block has completed: the insertion is run after the
/// select.
/// returns when the block has completed. In the example above, the
/// insertion is run after the select.
func readFromWrite(block: (db: Database) -> Void)
}