Skip to content

Commit 5e2e7e3

Browse files
committed
Documentation: Clarify when promise body gets executed
1 parent 8fbf698 commit 5e2e7e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/FAQ.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ You want `recover`.
258258
Often people are confused about when Promises “start”. Is it immediately? Is it
259259
later? Is it when you call `then`?
260260

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.
262262
As an example, `"Executing the promise body"` will be printed to the console right after the promise is created,
263263
without having to call `then` on the promise.
264264

@@ -282,7 +282,7 @@ let testPromise = Promise<Bool> { seal in
282282
}
283283
```
284284

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."`
286286
is only logged three seconds later. In this case `DispatchQueue` is responsible for deciding when to execute
287287
the task you pass to it, PromiseKit has nothing to do with it.
288288

0 commit comments

Comments
 (0)