no async in sync::watch::reciever::borrow_and_update() #6271
-
Hi, i have a question about the best implementation. now i stumbled upon the watch channel in the sync module which seems to be what im looking for here! i only care about the latest update since this are financial markets in realtime. now to my question. the borrow_and_update() method on reciever is not async. but since borrow_and_update() is not async. will this cause problems? best regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
What the docs suggest is using rx.changed().await;
let x = rx.borrow_and_update(); instead of rx.changed().await;
let x = rx.borrow(); So both versions have an |
Beta Was this translation helpful? Give feedback.
What the docs suggest is using
instead of
So both versions have an
.await
.