pub enum StackSize {
KiB4 = 4_096,
KiB8 = 8_192,
KiB16 = 16_384,
KiB32 = 32_768,
KiB64 = 65_536,
KiB128 = 131_072,
KiB256 = 262_144,
KiB512 = 524_288,
MiB = 1_048_576,
MiB2 = 2_097_152,
MiB4 = 4_194_304,
MiB8 = 8_388_608,
}
Expand description
Define the size of a stack
The default stack size on most systems is 8MiB. Generally speaking you will lose the light weight feel of M:N threading as you approach 8MiB. Smaller threads are better but too small and you risk crashing programs due to stack overflows.
Variants§
KiB4 = 4_096
KiB8 = 8_192
KiB16 = 16_384
KiB32 = 32_768
KiB64 = 65_536
KiB128 = 131_072
KiB256 = 262_144
KiB512 = 524_288
MiB = 1_048_576
MiB2 = 2_097_152
MiB4 = 4_194_304
MiB8 = 8_388_608
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StackSize
impl RefUnwindSafe for StackSize
impl Send for StackSize
impl Sync for StackSize
impl Unpin for StackSize
impl UnwindSafe for StackSize
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