Skip to content
Discussion options

You must be logged in to vote

That article I did read, it gave me the solution of putting #[tokio::main(flavor = "current_thread")] to make it work.
I've also tried the non async version, which seems not to fix the panic issue
but at the end, I solved the issue!
https://docs.rs/crossbeam/latest/crossbeam/channel/struct.Sender.html
using this crate, I could use a sender that is available to send thru threads safely!(so no weird .try_unwrap().unwrap() needed.
One question, why would using a macro async cause performance issues?

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@fzyzcjy
Comment options

@JustSimplyKyle
Comment options

@fzyzcjy
Comment options

@JustSimplyKyle
Comment options

Answer selected by JustSimplyKyle
@fzyzcjy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants