Commit Graph

8 Commits

Author SHA1 Message Date
Alex Martini
28f15008ee Cherry pick Swift 5.5 doc changes in TaskSleep.swift 2021-11-09 17:23:38 -08:00
Karoy Lorentey
47956908b7 [Concurrency] SwiftStdlib 5.5 ⟹ SwiftStdlib 5.1 (usages)
The concurrency runtime now deploys back to macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, which corresponds to the 5.1 release of the stdlib.

Adjust macro usages accordingly.
2021-10-28 14:36:36 -07:00
Varun Gandhi
79d45c0a96 Merge pull request #38477 from varungandhi-apple/vg-deprecate-old-sleep
[Concurrency] Deprecate Task.sleep(_:) in favor of Task.sleep(nanoseconds:).
2021-08-09 10:57:41 -07:00
Doug Gregor
d9e3259ff6 [SE-0304] Clean up handling of task priorities. 2021-07-30 12:53:03 -07:00
Varun Gandhi
9adc0a5bb1 [Concurrency] Deprecate Task.sleep(_:) in favor of Task.sleep(nanoseconds:). 2021-07-23 07:55:53 -07:00
Doug Gregor
121e34fa04 Reimplement Task.sleep(nanoseconds:) without the raciness.
The prior implementation of `Task.sleep()` effectively had two
different atomic words to capture the state, which could lead to cases
where cancelling before a sleep operation started would fail to
throw `CancellationError`. Reimplement the logic for the cancellable
sleep with a more traditional lock-free approach by
packing all of the state information into a single word, where we
always load, figure out what to do, then compare-and-swap.
2021-07-08 17:26:55 -07:00
Doug Gregor
7ba63cf53c [SE-0304] Clarify documentation of Task.sleep(nanoseconds:) slightly 2021-07-08 13:21:56 -07:00
Doug Gregor
59d1e61ac4 [SE-0304] Implement cancellable Task.sleep(nanoseconds:). 2021-07-08 09:46:07 -07:00