Struct open_coroutine_core::scheduler::Scheduler
source · #[repr(C)]pub struct Scheduler { /* private fields */ }
Implementations§
source§impl Scheduler
impl Scheduler
pub fn new() -> Self
pub fn with_name(name: Box<str>) -> Self
pub fn current<'s>() -> Option<&'s Scheduler>
pub fn submit( &self, f: impl FnOnce(&Suspender<'_, (), ()>, ()) -> usize + 'static, stack_size: Option<usize> ) -> Result<&'static str>
pub fn try_schedule(&self)
pub fn try_timed_schedule(&self, time: Duration) -> u64
pub fn try_timeout_schedule(&self, timeout_time: u64) -> u64
pub fn add_listener(&self, listener: impl Listener + 'static)
pub fn resume_syscall(&self, co_name: &'static str)
pub fn get_result(co_name: &'static str) -> Option<SchedulableCoroutine>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Scheduler
impl !Send for Scheduler
impl !Sync for Scheduler
impl Unpin for Scheduler
impl !UnwindSafe for Scheduler
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