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§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