pub struct ExecContext { /* private fields */ }Expand description
Caller-selected execution policy for prepared kernel replay.
This type intentionally hides its representation so future replay families can add provider-owned pools or scheduling scopes without forcing downstream crates to pattern-match a closed enum.
Implementations§
Source§impl ExecContext
impl ExecContext
Sourcepub fn max_threads(max_threads: usize) -> Result<Self>
pub fn max_threads(max_threads: usize) -> Result<Self>
Execute with an operation-local upper bound on worker threads.
Sourcepub const fn ambient() -> Self
pub const fn ambient() -> Self
Execute using the ambient runtime policy.
This is useful for direct strided-kernel users. Runtime crates that
own CPU resources should prefer ExecContext::serial or
ExecContext::max_threads so thread ownership remains explicit.
Sourcepub fn is_ambient(&self) -> bool
pub fn is_ambient(&self) -> bool
Returns true when this context delegates to ambient runtime policy.
Sourcepub fn max_threads_limit(&self) -> Option<NonZeroUsize>
pub fn max_threads_limit(&self) -> Option<NonZeroUsize>
Returns the configured worker-thread upper bound, if any.
Trait Implementations§
Source§impl Clone for ExecContext
impl Clone for ExecContext
Source§fn clone(&self) -> ExecContext
fn clone(&self) -> ExecContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExecContext
Source§impl Debug for ExecContext
impl Debug for ExecContext
Source§impl Default for ExecContext
impl Default for ExecContext
impl Eq for ExecContext
Source§impl PartialEq for ExecContext
impl PartialEq for ExecContext
impl StructuralPartialEq for ExecContext
Auto Trait Implementations§
impl Freeze for ExecContext
impl RefUnwindSafe for ExecContext
impl Send for ExecContext
impl Sync for ExecContext
impl Unpin for ExecContext
impl UnsafeUnpin for ExecContext
impl UnwindSafe for ExecContext
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