mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Tasks shouldn't normally hog the actor context indefinitely after making a call that's bound to that actor, since that prevents the actor from potentially taking on other jobs it needs to be able to address. Set up SILGen so that it saves the current executor (using a new runtime entry point) and hops back to it after every actor call, not only ones where the caller context is also actor-bound. The added executor hopping here also exposed a bug in the runtime implementation while processing DefaultActor jobs, where if an actor job returned to the processing loop having already yielded the thread back to a generic executor, we would still attempt to make the actor give up the thread again, corrupting its state. rdar://71905765
1.2 KiB
1.2 KiB