Is it possible to put mpsc channel into a state #584
-
I ran into an issue with storing Tokio's The issue seems to be that the channel's implementation used
Is this something doable within this framework, or is there any workaround for this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This looks like a similar problem to #570 - it might not be possible to store that sender in the state if it isn't unwind safe. I guess the work around would be to not store non-unwind safe structs in the state? You can always store them somewhere else (e.g. in a static variable) and use that from your handler - handler's are just Rust functions after all. |
Beta Was this translation helpful? Give feedback.
This looks like a similar problem to #570 - it might not be possible to store that sender in the state if it isn't unwind safe.
I guess the work around would be to not store non-unwind safe structs in the state? You can always store them somewhere else (e.g. in a static variable) and use that from your handler - handler's are just Rust functions after all.