pub struct PriorityScheduler;Implementations§
Source§impl PriorityScheduler
impl PriorityScheduler
Sourcepub fn declare_thread(priority: usize) -> ThreadPriorityHandle
pub fn declare_thread(priority: usize) -> ThreadPriorityHandle
Declares a new thread that does busy work with an execution priority (lower => more priority)
Sourcepub fn set_max_threads_count(threads_count: usize)
pub fn set_max_threads_count(threads_count: usize)
Sets the maximum allowed number of running threads
Sourcepub fn execute_blocking_call<T>(
_handle: &ThreadPriorityHandle,
waiting_fn: impl FnOnce() -> T,
) -> T
pub fn execute_blocking_call<T>( _handle: &ThreadPriorityHandle, waiting_fn: impl FnOnce() -> T, ) -> T
Declares that the current thread is waiting inside the lambda, not counting it in the running threads
Sourcepub async fn execute_blocking_call_async<T>(
_handle: &ThreadPriorityHandle,
waiting_fn: impl Future<Output = T>,
) -> T
pub async fn execute_blocking_call_async<T>( _handle: &ThreadPriorityHandle, waiting_fn: impl Future<Output = T>, ) -> T
Declares that the current thread is waiting inside the lambda, not counting it in the running threads
Auto Trait Implementations§
impl Freeze for PriorityScheduler
impl RefUnwindSafe for PriorityScheduler
impl Send for PriorityScheduler
impl Sync for PriorityScheduler
impl Unpin for PriorityScheduler
impl UnwindSafe for PriorityScheduler
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more