Async_std::task:;spawn and thread::spawn talking over channels?

I have some crates that are async, where tasks are started via async_std::task::spawn; these tasks talk to each over via async channels.

I have other crates that are sync, where threads are started via thread::spawn and these threads talk to each over via sync channels.

Question: is there some channel where one side can be used by sync, and one side can be used by async, so the two crates can talk to each other ?

Tokio's channel has dedicated method for it. Flume might also. As for other channels, putting their send or recv calls into a block_on should work.

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.