-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Description
| Previous ID | SR-14802 |
| Radar | rdar://problem/79563720 |
| Original Reporter | @jshier |
| Type | Bug |
Attachment: Download
Environment
Xcode 13b1, default and 6/14 5.5 toolchain, iOS 15 simulator
Additional Detail from JIRA
| Votes | 2 |
| Component/s | |
| Labels | Bug |
| Assignee | None |
| Priority | Medium |
md5: 299292dc9504c5fcebe4846384790ce5
is duplicated by:
- SR-14875 Resuming continuations from actor contexts can hang
Issue Description:
As discussed on the forums: https://forums.swift.org/t/concurrency-hang-when-continuations-resumed-in-task-but-not-in-actor/49772/6
I create a continuation to allow users to wait for network data captured by an actor and capture its resume in a stored closure. When that capture is complete, I call the enqueued closures to trigger the continuations. Strictly calling the closure within an actor method works fine. Wrapping the closure call in an unstructured task causes a hang and the waiter is never notified. However, simply adding a print statement at the end of the actor method allows it to work. My test iOS project is attached.