Skip to content

Commit

Permalink
Mention that Swift 6 fixes the core problem
Browse files Browse the repository at this point in the history
  • Loading branch information
dfed committed Jun 28, 2024
1 parent 787875d commit b15a78c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A library of queues that enable sending ordered tasks from synchronous to asynch

## Task Ordering and Swift Concurrency

Tasks sent from a synchronous context to an asynchronous context in Swift Concurrency are inherently unordered. Consider the following test:
Tasks sent from a synchronous context to an asynchronous context in Swift Concurrency prior to Swift 6 are inherently unordered. Consider the following test:

```swift
@MainActor
Expand Down Expand Up @@ -40,7 +40,7 @@ func testMainActorTaskOrdering() async {

Despite the spawned `Task` inheriting the serial `@MainActor` execution context, the ordering of the scheduled asynchronous work is not guaranteed.

While [actors](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html#ID645) are great at serializing tasks, there is no simple way in the standard Swift library to send ordered tasks to them from a synchronous context.
While [actors](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html#ID645) are great at serializing tasks, there is no simple way in the standard Swift library prior to Swift 6 to send ordered tasks to them from a synchronous context.

### Executing asynchronous tasks in FIFO order

Expand Down

0 comments on commit b15a78c

Please sign in to comment.