Restaged repo, allocator and runtime implemented, ioring-backed async fs/net/channel/timer primitives
This commit is contained in:
10
lib/runtime/src/sys/linux/channel.rs
Normal file
10
lib/runtime/src/sys/linux/channel.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
//! Linux channel wake helpers.
|
||||
|
||||
use crate::op::completion::{CompletionFuture, CompletionHandle, completion};
|
||||
use crate::platform::linux_x86_64::runtime::try_current_thread_handle;
|
||||
|
||||
pub(crate) fn runtime_waiter<T: Send + 'static>() -> (CompletionFuture<T>, CompletionHandle<T>) {
|
||||
let owner = try_current_thread_handle()
|
||||
.expect("async channel operations must be polled on a runtime thread");
|
||||
completion(owner)
|
||||
}
|
||||
Reference in New Issue
Block a user