From 735394669dc186bcbcebcf570d6cbf365da8c642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Mon, 29 Oct 2018 18:28:10 +0100 Subject: [PATCH] Documentation --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 62bbeca21..514ffa7e3 100644 --- a/README.md +++ b/README.md @@ -6517,6 +6517,7 @@ The `scheduling` property lets you control how fresh values are notified: // On main queue let observation = ValueObservation.trackingAll(Player.all()) let observer = try dbQueue.start(observation) { players: [Player] in + // On main queue print("fresh players: \(players)") } // <- here "fresh players" is already printed. @@ -6525,10 +6526,10 @@ The `scheduling` property lets you control how fresh values are notified: If the observation does not start on the main queue, an initial value is also notified on the main queue, but asynchronously: ```swift - // Not on the main queue: "fresh players" is eventually printed - // on the main queue. + // Not on the main queue let observation = ValueObservation.trackingAll(Player.all()) let observer = try dbQueue.start(observation) { players: [Player] in + // On main queue print("fresh players: \(players)") } ``` @@ -6551,7 +6552,7 @@ The `scheduling` property lets you control how fresh values are notified: var observation = ValueObservation.trackingAll(Player.all()) observation.scheduling = .onQueue(customQueue, startImmediately: true) let observer = try dbQueue.start(observation) { players: [Player] in - // in customQueue + // On customQueue print("fresh players: \(players)")s } ```