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
Different from #199, a semantic one-shot channel may help in reasoning.
That said, bounded(1) doesn't mean the channel will handle only one event all the time, but it can buffer at most one event.
A semantic one-shot channel is like a CountDownLaunch with count=1, which means only one event can be delivered and the following will be rejected with an error.
I don't find an implementation in crossbeam-channel. Thus, I file this issue to see if it's a valid suggestion or we can implement it with current structs.
The text was updated successfully, but these errors were encountered:
If the purpose is to restrict the API, you might be able to do this just by creating a wrapper type.
If the purpose is performance, it is not clear how large the actual performance benefit is, as I felt the single-capacity optimized variant I tried in #199 was similar to the one used in tokio::sync::oneshot.
Different from #199, a semantic one-shot channel may help in reasoning.
That said,
bounded(1)
doesn't mean the channel will handle only one event all the time, but it can buffer at most one event.A semantic one-shot channel is like a CountDownLaunch with
count=1
, which means only one event can be delivered and the following will be rejected with an error.I don't find an implementation in crossbeam-channel. Thus, I file this issue to see if it's a valid suggestion or we can implement it with current structs.
The text was updated successfully, but these errors were encountered: