At present, Messages require you to set up a subscription that lasts until you cancel it, which is not the most ergonomic for one-shot messages or for a back-and-forth protocol.
Instead, we should
offer the ability to one-shot subscribe to a message (this existed previously, but was removed for Reasons:tm:)
use the former to provide a nice async wrapper for awaiting messages:
let (source, value) = MyCoolMessage::receive().await;
(it feels to me that (value, source) is a better order, but (source, value) is consistent with subscribe)
At present,
Message
s require you to set up a subscription that lasts until you cancel it, which is not the most ergonomic for one-shot messages or for a back-and-forth protocol.Instead, we should
(it feels to me that
(value, source)
is a better order, but(source, value)
is consistent withsubscribe
)Also relevant:
673
253