pub struct Threadpool {
pub lanes: Vec<Lane>,
pub stacksize: usize,
pub allow_request_buffering: bool,
pub max_buffered_requests: u32,
}Expand description
A threadpool with lanes (RT-CORBA §5.7). Models structure + selection; the actual thread spawning is the responsibility of the runtime integration.
Fields§
§lanes: Vec<Lane>Lanes (one per served priority).
stacksize: usizeStack size per thread in bytes (0 = platform default).
allow_request_buffering: boolWhether requests are buffered when a lane is full (instead of rejected).
max_buffered_requests: u32Max buffered requests (0 = unbounded when buffering is on).
Implementations§
Source§impl Threadpool
impl Threadpool
Sourcepub fn lane_for(&self, priority: Priority) -> Option<&Lane>
pub fn lane_for(&self, priority: Priority) -> Option<&Lane>
Selects the lane for a request priority: the lane with the highest
priority ≤ priority (the most demanding one that still covers the
request). Returns None if no lane fits.
Sourcepub fn static_capacity(&self) -> u32
pub fn static_capacity(&self) -> u32
Total static thread capacity across all lanes.
Trait Implementations§
Source§impl Clone for Threadpool
impl Clone for Threadpool
Source§fn clone(&self) -> Threadpool
fn clone(&self) -> Threadpool
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 moreAuto Trait Implementations§
impl Freeze for Threadpool
impl RefUnwindSafe for Threadpool
impl Send for Threadpool
impl Sync for Threadpool
impl Unpin for Threadpool
impl UnsafeUnpin for Threadpool
impl UnwindSafe for Threadpool
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