-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
RTRelated to the Heph-rt crate.Related to the Heph-rt crate.enhancementAn improvement of the API.An improvement of the API.priority:lowLow priority issue.Low priority issue.
Description
In commit c33ed02 (issue #279) a new Spawn trait was introduced. It comes with three generic parameters S (Supervisor), NA (NewActor) and RT (either ThreadLocal or ThreadSafe). This was required because spawn of thread-safe actors requires, S, NA and NA::Actor to be Send + Sync, while thread-local actors don't have this requirement. However when using async function as actor we can't name NA or NA::Actor, making this trait impossible to use with it.
My initial idea was to split the two traits: Spawn and SpawnLocal, but types like TcpServer need a single trait otherwise we have to implement that twice as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
RTRelated to the Heph-rt crate.Related to the Heph-rt crate.enhancementAn improvement of the API.An improvement of the API.priority:lowLow priority issue.Low priority issue.