Struct cros_async::sys::linux::fd_executor::EpollReactor    
source · pub struct EpollReactor {
    poll_ctx: WaitContext<usize>,
    ops: Mutex<Slab<OpStatus>>,
    wake_event: Event,
}Expand description
Reactor that manages async IO work using epoll.
Fields§
§poll_ctx: WaitContext<usize>§ops: Mutex<Slab<OpStatus>>§wake_event: EventImplementations§
source§impl EpollReactor
 
impl EpollReactor
fn new() -> Result<Self>
fn add_operation( &self, file: Arc<OwnedFd>, event_type: EventType, ) -> Result<WakerToken>
fn is_ready(&self, token: &WakerToken, cx: &mut Context<'_>) -> bool
fn cancel_operation(&self, token: WakerToken) -> Result<()>
Trait Implementations§
source§impl AsRawDescriptors for EpollReactor
 
impl AsRawDescriptors for EpollReactor
source§fn as_raw_descriptors(&self) -> Vec<RawDescriptor>
 
fn as_raw_descriptors(&self) -> Vec<RawDescriptor>
Returns the underlying raw descriptors. Read more
source§impl Reactor for EpollReactor
 
impl Reactor for EpollReactor
fn new() -> Result<Self>
source§fn wake(&self)
 
fn wake(&self)
Wake up any pending 
wait_for_work calls. If there are none pending, then wake up the next
wait_for_work call (necessary to avoid race conditions).source§fn on_executor_drop<'a>(&'a self) -> Pin<Box<dyn Future<Output = ()> + 'a>>
 
fn on_executor_drop<'a>(&'a self) -> Pin<Box<dyn Future<Output = ()> + 'a>>
Called when the executor is being dropped to allow orderly shutdown (e.g. cancelling IO
work). The returned future will be run to completion. Read more
source§fn wait_for_work(&self, set_processing: impl Fn()) -> Result<()>
 
fn wait_for_work(&self, set_processing: impl Fn()) -> Result<()>
Block until an event occurs (e.g. IO work is ready) or until 
wake is called. Read moresource§fn new_source<F: AsRawDescriptor>(
    &self,
    ex: &Arc<RawExecutor<Self>>,
    f: F,
) -> AsyncResult<IoSource<F>>
 
fn new_source<F: AsRawDescriptor>( &self, ex: &Arc<RawExecutor<Self>>, f: F, ) -> AsyncResult<IoSource<F>>
Create an 
IoSource for the backend.fn wrap_task_handle<R>(task: RawTaskHandle<EpollReactor, R>) -> TaskHandle<R> ⓘ
source§fn on_thread_start(&self)
 
fn on_thread_start(&self)
Called when an executor run loop starts on a thread.
Auto Trait Implementations§
impl !Freeze for EpollReactor
impl RefUnwindSafe for EpollReactor
impl Send for EpollReactor
impl Sync for EpollReactor
impl Unpin for EpollReactor
impl UnwindSafe for EpollReactor
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more