mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-13 08:01:05 +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>
|
) -> ConnectSignalChannels<F>
|
||||||
where
|
where
|
||||||
Req: SignalRequest + Send + 'static,
|
Req: SignalRequest + Send + 'static,
|
||||||
Resp: 'static,
|
Resp: Send + 'static,
|
||||||
F: Send + 'static,
|
F: Send + 'static,
|
||||||
T: FnOnce(UnboundedReceiverStream<Req>) -> Streaming<Resp>,
|
T: FnOnce(UnboundedReceiverStream<Req>) -> Streaming<Resp>,
|
||||||
O: FnMut(Resp, btree_map::ValuesMut<'_, SignalConnId, F>) + Send + 'static,
|
O: FnMut(Resp, btree_map::ValuesMut<'_, SignalConnId, F>) + Send + 'static,
|
||||||
|
@ -300,6 +300,7 @@ where
|
||||||
match response {
|
match response {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
on_response(response, callbacks.values_mut());
|
on_response(response, callbacks.values_mut());
|
||||||
|
tokio::task::yield_now().await;
|
||||||
|
|
||||||
control_sender
|
control_sender
|
||||||
.send(Req::from_control(StreamControl::Ready))
|
.send(Req::from_control(StreamControl::Ready))
|
||||||
|
|
Loading…
Reference in a new issue