pantomime-rs / pantomime

MIT License
5 stars 1 forks source link

streams: Add StreamContext::stage_ref #61

Closed longshorej closed 5 years ago

longshorej commented 5 years ago

This adds a StreamContext::stage_ref method, which allows logic implementations to obtain an owned value that can be used to asynchronously message the logic instance.

The resulting StageRef is Send and Sync and so lends itself well to multithreaded programming.

Fixes #58 Fixes #56