pub struct AsyncRuntimeConfig {
pub max_tasks: usize,
pub default_priority: TaskPriority,
pub timer_resolution_ms: u64,
}Expand description
Configuration for a user-space async runtime instance.
Provides tuning parameters that the kernel uses when allocating scheduler resources for a process’s async runtime.
Fields§
§max_tasks: usizeMaximum number of concurrent async tasks.
default_priority: TaskPriorityDefault priority for newly spawned tasks.
timer_resolution_ms: u64Timer resolution in milliseconds (minimum timer granularity).
Implementations§
Source§impl AsyncRuntimeConfig
impl AsyncRuntimeConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a configuration with sensible defaults.
Defaults: 256 max tasks, Normal priority, 1 ms timer resolution.
Sourcepub fn with_max_tasks(self, max_tasks: usize) -> Self
pub fn with_max_tasks(self, max_tasks: usize) -> Self
Return a new configuration with the given maximum task count.
Trait Implementations§
Source§impl Clone for AsyncRuntimeConfig
impl Clone for AsyncRuntimeConfig
Source§fn clone(&self) -> AsyncRuntimeConfig
fn clone(&self) -> AsyncRuntimeConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AsyncRuntimeConfig
impl Debug for AsyncRuntimeConfig
Source§impl Default for AsyncRuntimeConfig
impl Default for AsyncRuntimeConfig
Source§impl PartialEq for AsyncRuntimeConfig
impl PartialEq for AsyncRuntimeConfig
impl Copy for AsyncRuntimeConfig
impl Eq for AsyncRuntimeConfig
impl StructuralPartialEq for AsyncRuntimeConfig
Auto Trait Implementations§
impl Freeze for AsyncRuntimeConfig
impl RefUnwindSafe for AsyncRuntimeConfig
impl Send for AsyncRuntimeConfig
impl Sync for AsyncRuntimeConfig
impl Unpin for AsyncRuntimeConfig
impl UnwindSafe for AsyncRuntimeConfig
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)