pub struct ThreadBuilder { /* private fields */ }Expand description
Resource and diagnostic configuration for one kernel thread.
Implementations§
Source§impl ThreadBuilder
impl ThreadBuilder
Sourcepub fn stack_size(self, stack_size: usize) -> Self
pub fn stack_size(self, stack_size: usize) -> Self
Selects the usable stack size in bytes.
Sourcepub fn stack_alignment(self, stack_alignment: usize) -> Self
pub fn stack_alignment(self, stack_alignment: usize) -> Self
Selects the stack alignment in bytes.
Sourcepub fn guard_size(self, guard_size: usize) -> Self
pub fn guard_size(self, guard_size: usize) -> Self
Requests an inaccessible stack guard area from the runtime.
Sourcepub fn policy(self, policy: SchedulePolicy) -> Self
pub fn policy(self, policy: SchedulePolicy) -> Self
Selects the base scheduler policy.
Sourcepub fn affinity(self, affinity: CpuSet) -> Self
pub fn affinity(self, affinity: CpuSet) -> Self
Restricts placement to the supplied topology-sized CPU set.
Sourcepub unsafe fn extension(self, extension: ThreadExtension) -> Self
pub unsafe fn extension(self, extension: ThreadExtension) -> Self
Composes one OS-owned extension inside the portable thread wrapper.
§Safety
extension transfers unique callback-data ownership into this builder.
The caller must not install another copy or invoke its drop callback.
This builder must be spawned or dropped in ordinary task context.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThreadBuilder
impl RefUnwindSafe for ThreadBuilder
impl Send for ThreadBuilder
impl Sync for ThreadBuilder
impl Unpin for ThreadBuilder
impl UnsafeUnpin for ThreadBuilder
impl UnwindSafe for ThreadBuilder
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