I've got a piece of compute-heavy synchronous code and I'd like to let users control it via a web UI that talks to a web server. Most of the web server frameworks I've been looking at are built on top of hyper and use asynchronous IO.
Are there any established conventions for sending messages from my async web server to my sync code?
I was looking at
futures::channel::mpsc and noticed
Receiver::try_next() can be called without needing
Pin or a waker... Is it okay to use send/receive on a
futures channel outside of a
Future? Or is this liable to accidentally deadlock or panic?