Replies: 1 comment 1 reply
-
I would expect that the oneshot channel is the more performant choice. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I’m in a situation where I need to notify a task of an event, and I need to do that exactly once. Under the assumption that the “weakest” tool (the one that provides the fewest features or the most limited usage constraints) is probably the most performant or lightest-weight, there appear to be two options with no obvious choice between them: a
oneshot
channel over unit (()
) type, or aNotify
. It’s not obvious how to choose between them: aoneshot
channel has the advantage of not needing the complexity of being used more than once, but aNotify
has the advantage of not needing the complexity of transporting data. As far as I can tell, the documentation doesn’t really suggest which of these two tools is more suitable. Which is it? As this does not seem like an unusual situation, would it be appropriate to add something to the documentation about it? Thanks.Beta Was this translation helpful? Give feedback.
All reactions