Skip to content

Commit 126187f

Browse files
authored
Merge pull request swiftlang#15 from ryansobol/patch-1
Update nnnn-structured-concurrency.md
2 parents fef20b2 + b6cf7ce commit 126187f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proposals/nnnn-structured-concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ Note also that no information is passed to the task about why it was cancelled.
306306

307307
A very common use case for cancellation is cancelling tasks because they are taking too long to complete. This proposal introduces the concept of *deadlines* and enables them to cause a task to consider itself as cancelled if such deadline is exceeded.
308308

309-
We intentionally use _deadlines_ ("points in time") as opposed to _timeouts_ ("durations of time"). This is because deadlines compose correctly: working with timeouts is prone to errors where the deadline is accidentally extended because a full timeout is reused rather than being adjusted for the time already passed. For convenience, we allow code to use a relative timeout when setting the deadline up; this will be immediately translated to an absolute deadlinie.
309+
We intentionally use _deadlines_ ("points in time") as opposed to _timeouts_ ("durations of time"). This is because deadlines compose correctly: working with timeouts is prone to errors where the deadline is accidentally extended because a full timeout is reused rather than being adjusted for the time already passed. For convenience, we allow code to use a relative timeout when setting the deadline up; this will be immediately translated to an absolute deadline.
310310

311311
To futher analyze the semantics of deadlines, let's extend our dinner preparation example with deadlines.
312312

0 commit comments

Comments
 (0)