mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
chore: removed blocking_recv
just block_on(recv()) ...
This commit is contained in:
parent
e0d4360d09
commit
f706237828
1 changed files with 0 additions and 7 deletions
|
@ -58,11 +58,4 @@ pub trait Controller<T : Sized + Send + Sync> : Sized + Send + Sync {
|
|||
|
||||
/// attempt to receive a value without blocking, return None if nothing is available
|
||||
fn try_recv(&self) -> Result<Option<T>>;
|
||||
|
||||
/// sync variant of [Self::recv], blocking invoking thread
|
||||
/// this calls [Controller::recv] inside a [tokio::runtime::Runtime::block_on]
|
||||
#[cfg(feature = "sync")]
|
||||
fn blocking_recv(&self, rt: &tokio::runtime::Handle) -> Result<T> {
|
||||
rt.block_on(self.recv())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue