mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
sync: remove rt-core from blocking_{send,recv} (#2825)
This commit is contained in:
parent
ea79c95c67
commit
a0a356152e
@ -184,8 +184,6 @@ impl<T> Receiver<T> {
|
|||||||
/// sync_code.join().unwrap()
|
/// sync_code.join().unwrap()
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[cfg(feature = "rt-core")]
|
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "rt-core")))]
|
|
||||||
pub fn blocking_recv(&mut self) -> Option<T> {
|
pub fn blocking_recv(&mut self) -> Option<T> {
|
||||||
let mut enter_handle = crate::runtime::enter::enter(false);
|
let mut enter_handle = crate::runtime::enter::enter(false);
|
||||||
enter_handle.block_on(self.recv()).unwrap()
|
enter_handle.block_on(self.recv()).unwrap()
|
||||||
@ -456,8 +454,6 @@ impl<T> Sender<T> {
|
|||||||
/// sync_code.join().unwrap()
|
/// sync_code.join().unwrap()
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[cfg(feature = "rt-core")]
|
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "rt-core")))]
|
|
||||||
pub fn blocking_send(&mut self, value: T) -> Result<(), SendError<T>> {
|
pub fn blocking_send(&mut self, value: T) -> Result<(), SendError<T>> {
|
||||||
let mut enter_handle = crate::runtime::enter::enter(false);
|
let mut enter_handle = crate::runtime::enter::enter(false);
|
||||||
enter_handle.block_on(self.send(value)).unwrap()
|
enter_handle.block_on(self.send(value)).unwrap()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user