You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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