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
The current channels are not analogous to the libstd ones. A notable missing feature is Receiver::try_recv for taking an item from the channel in a non blocking fashion.
I have a service where background workers conjure fairly expensive resources (start virtual machines, all of which are identical) and they then pass handles to these via a channel. On the other end is a user facing API where access to one such resource can be requested. I want to use try_recv to get an available resource from the channel. Because if there are no resources available I want the request to fail immediately. The API should yield immediate results, and no long queues should be built up.
The text was updated successfully, but these errors were encountered:
The current channels are not analogous to the libstd ones. A notable missing feature is
Receiver::try_recv
for taking an item from the channel in a non blocking fashion.I have a service where background workers conjure fairly expensive resources (start virtual machines, all of which are identical) and they then pass handles to these via a channel. On the other end is a user facing API where access to one such resource can be requested. I want to use
try_recv
to get an available resource from the channel. Because if there are no resources available I want the request to fail immediately. The API should yield immediate results, and no long queues should be built up.The text was updated successfully, but these errors were encountered: