Skip to content

Macro to implement some kind of non-reentrant actor in Swift

Notifications You must be signed in to change notification settings

martiall/swift-nonreentrant-actor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift Non-Reentrant actor macro

Following a discussion on the Swift Forum Making actor non reentrant some ideas were proposed to workaround this limitation. One being to queue all calls to an AsyncStream and execute them serially.

Would it be possible to implement this pattern using the newly added Function Body Macro ?

This is not well tested, or even assessed to be correct. Use this at your own risk.

Feedbacks are more than welcome.

About

Macro to implement some kind of non-reentrant actor in Swift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages