How to use Streams from bevy_tasks #15336
Unanswered
iancormac84
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having difficulty wrapping my head around how to retrieve data from a Stream as opposed to a Future, using bevy_tasks. I'm trying to use the HotplugWatch API from the nusb crate (note that the HotplugWatch API is not yet in a released version of the crate). HotplugWatch implements Stream and would yield a stream of HotplugEvents. Suggestions found by searching are to detach the task that is created by calling spawn on the bevy_task threadpool or to poll it manually, but some examples may be needed. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions