File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ You want `recover`.
258
258
Often people are confused about when Promises “start”. Is it immediately? Is it
259
259
later? Is it when you call ` then ` ?
260
260
261
- The answer is: The promise ** body** executes right after the promise is created , on the current thread.
261
+ The answer is: The promise ** body** executes during initialization of the promise, on the current thread.
262
262
As an example, ` "Executing the promise body" ` will be printed to the console right after the promise is created,
263
263
without having to call ` then ` on the promise.
264
264
@@ -282,7 +282,7 @@ let testPromise = Promise<Bool> { seal in
282
282
}
283
283
```
284
284
285
- The message ` Executing the promise body. ` is being logged right away, but the message ` Executing asyncAfter. `
285
+ The message ` " Executing the promise body." ` is being logged right away, but the message ` " Executing asyncAfter." `
286
286
is only logged three seconds later. In this case ` DispatchQueue ` is responsible for deciding when to execute
287
287
the task you pass to it, PromiseKit has nothing to do with it.
288
288
You can’t perform that action at this time.
0 commit comments