This commit is contained in:
Nikita Galaiko 2023-08-03 08:31:40 +02:00
parent bed60f544f
commit eb24408cd3

View File

@ -62,9 +62,10 @@ mod tests {
let dispatcher2 = dispatcher.clone();
let mut rx = dispatcher2.run(Duration::from_millis(10)).unwrap();
tokio::time::sleep(Duration::from_millis(50)).await;
dispatcher.stop().unwrap();
spawn(async move {
tokio::time::sleep(Duration::from_millis(50)).await;
dispatcher.stop().unwrap();
});
let mut count = 0;
while let Some(event) = rx.recv().await {