File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,19 @@ pub struct Lighthouse<S> {
2020 request_id : i32 ,
2121}
2222
23+ /// A facility for coordinating asynchronous responses to a request between a
24+ /// requesting task and a receive loop task.
2325enum Slot < M > {
24- /// Indicates that messages were received before the request task queried it.
25- /// Generally set by the receive loop task.
26+ /// Indicates that messages were received before the requesting task
27+ /// registered the slot. **The receive loop** will construct this variant in
28+ /// that case, i.e. store the already received messages in a
29+ /// [`Slot::EarlyMessages`].
2630 EarlyMessages ( Vec < M > ) ,
27- /// Indicates that messages were not received before the request task queried it.
28- /// Generally set by the request task.
31+ /// Indicates that no messages were received before the requesting task
32+ /// registered the slot. **The requesting thread** will construct this
33+ /// variant in that case, i.e. create a channel, store the sender in a
34+ /// [`Slot::WaitForMessages`] for the receive loop and then return the
35+ /// receiver.
2936 WaitForMessages ( Sender < M > ) ,
3037}
3138
You can’t perform that action at this time.
0 commit comments