mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-25 09:59:21 +01:00
Yield after running signal callbacks
This commit is contained in:
parent
5db8b1c54d
commit
2427ba620e
1 changed files with 2 additions and 1 deletions
|
@ -263,7 +263,7 @@ fn connect_signal<Req, Resp, F, T, O>(
|
|||
) -> ConnectSignalChannels<F>
|
||||
where
|
||||
Req: SignalRequest + Send + 'static,
|
||||
Resp: 'static,
|
||||
Resp: Send + 'static,
|
||||
F: Send + 'static,
|
||||
T: FnOnce(UnboundedReceiverStream<Req>) -> Streaming<Resp>,
|
||||
O: FnMut(Resp, btree_map::ValuesMut<'_, SignalConnId, F>) + Send + 'static,
|
||||
|
@ -300,6 +300,7 @@ where
|
|||
match response {
|
||||
Ok(response) => {
|
||||
on_response(response, callbacks.values_mut());
|
||||
tokio::task::yield_now().await;
|
||||
|
||||
control_sender
|
||||
.send(Req::from_control(StreamControl::Ready))
|
||||
|
|
Loading…
Reference in a new issue