You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swift 5.10 permit the creation of actors with custom executors. A very common use case is actors backed with a DispatchQueue. This is useful when wrapping lower-level APIs, such as FSEventStreams or any queue-backed Core Foundation functionality. For those case, you can define an actor wrapping the state and be sure to be called back in the executor queue.
Swift 6 introduces the assumeIsolated(_:) function that permits to jump synchronously to the actor's critical section; However that functionality is not backported and therefore you need to use "unsafe bitcasting" for systems running in Swift 5 runtimes. The bitcasting sadly produces a warning every time the bitcast is used. For cases such a File System monitor that will produce an exorbitant amount of warnings. The only way to remove those warnings is setting SWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL=0.
Swift 5.10 permit the creation of actors with custom executors. A very common use case is actors backed with a
DispatchQueue
. This is useful when wrapping lower-level APIs, such asFSEventStream
s or any queue-backed Core Foundation functionality. For those case, you can define an actor wrapping the state and be sure to be called back in the executor queue.Swift 6 introduces the
assumeIsolated(_:)
function that permits to jump synchronously to the actor's critical section; However that functionality is not backported and therefore you need to use "unsafe bitcasting" for systems running in Swift 5 runtimes. The bitcasting sadly produces a warning every time the bitcast is used. For cases such a File System monitor that will produce an exorbitant amount of warnings. The only way to remove those warnings is settingSWIFT_UNEXPECTED_EXECUTOR_LOG_LEVEL=0
.We have discussed this in the Swift forums.
The text was updated successfully, but these errors were encountered: