Tokio event loop with Amethyst

(Joonatan Saarhelo) #1

Hi, I want to use Amethyst to visualize data coming from a socket.

I have a async fn that returns a Stream of data structures. But the only way I’ve found to call an async fn is to make my main into an event loop, for example the one provided by tokio.

I need to either make Amethyst poll the stream or make my own main loop. I don’t know how to do either and the documentation seems rather incomplete.

(Kae) #2

Try spawning a new thread for your event loop and send data to your amethyst thread(s) using a crossbeam channel