Confusing use of `notify`
Thank you for all the effort put into Tokio and the mini-redis demonstration project. As well as for making these open source.
Trying to understand Rust, we were confused by the use of the term notify to refer to a Receiver, specifically notify.recv() had us looking twice.
Some dictionaries have listen or collect or gather as antonyms for notify.
We think changing this usage of notify to one of the antonyms may be less puzzling?
Changing it to listen or receiver sounds reasonable to me. I do not think that collect and gather would be good names.
Thanks for the feedback. We had contemplated receiver but thought for new users, coming from other languages, it might be mistaken as an instance (or some such concept) of Receiver, while from (weak/flawed) memory it is a Future.
We're still working through this example so will likely wait a while before making an PR - to ensure we haven't misunderstood.
For future reference, we also thought this line (signalling is a synonym for sending):
/// Shutdown is signalled using a `broadcast::Receiver`.
might be better phrased:
/// Shutdown signals are monitored via a `broadcast::Receiver`.
Which of course suggests that monitor is a better replacement term for notify?
We had contemplated receiver but thought for new users, coming from other languages, it might be mistaken as an instance (or some such concept) of
Receiver, while from (weak/flawed) memory it is aFuture.
No, it isn't a Future. It is an instance of the type tokio::sync::broadcast::Receiver.
As for the word "monitor", I find that word very unnatural here. If we are to rephrase the sentence, I would prefer this:
/// Shutdown signals are received using a `broadcast::Receiver`.
receiver it is then.