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: Event

Implementations§

source§

impl EpollReactor

source

fn new() -> Result<Self>

source

fn add_operation( &self, file: Arc<OwnedFd>, event_type: EventType ) -> Result<WakerToken>

source

fn is_ready(&self, token: &WakerToken, cx: &mut Context<'_>) -> bool

source

fn cancel_operation(&self, token: WakerToken) -> Result<()>

Trait Implementations§

source§

impl AsRawDescriptors for EpollReactor

source§

fn as_raw_descriptors(&self) -> Vec<RawDescriptor>

Returns the underlying raw descriptors. Read more
source§

impl Reactor for EpollReactor

source§

fn new() -> Result<Self>

source§

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

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<()>

Block until an event occurs (e.g. IO work is ready) or until wake is called. Read more
source§

fn new_source<F: AsRawDescriptor>( &self, ex: &Arc<RawExecutor<Self>>, f: F ) -> AsyncResult<IoSource<F>>

Create an IoSource for the backend.
source§

fn wrap_task_handle<R>(task: RawTaskHandle<EpollReactor, R>) -> TaskHandle<R>

source§

fn on_thread_start(&self)

Called when an executor run loop starts on a thread.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.