pub struct ArenaProvider { /* private fields */ }Expand description
A workspace owner: per-thread worker slots plus a free list of team sets.
One per owner — never process-global — so a lease always returns to the provider that issued it and no second owner can borrow it.
Implementations§
Source§impl ArenaProvider
impl ArenaProvider
Sourcepub fn traced() -> Self
pub fn traced() -> Self
A fresh owner that records where its storage is first touched, readable
through ArenaProvider::trace_take.
Sourcepub fn trace_take(&self) -> Vec<(ThreadId, usize)>
pub fn trace_take(&self) -> Vec<(ThreadId, usize)>
Take this owner’s recorded buffer growths, leaving its log empty.
Empty unless the owner was built with ArenaProvider::traced.
Sourcepub fn stats(&self) -> WorkspaceStats
pub fn stats(&self) -> WorkspaceStats
Bytes currently retained and leased, for accounting by the host.
Sourcepub fn retained_bytes(&self) -> usize
pub fn retained_bytes(&self) -> usize
Bytes currently retained, for accounting in tests and diagnostics.
Sourcepub fn retained_panel_bytes(&self) -> usize
pub fn retained_panel_bytes(&self) -> usize
Panel bytes retained, idle or leased. Unlike
ArenaProvider::retained_bytes this does not depend on which workers
happened to take part, so it is what a test can compare between two runs
of one shape.
Trait Implementations§
Source§impl Debug for ArenaProvider
impl Debug for ArenaProvider
Source§impl Default for ArenaProvider
impl Default for ArenaProvider
Source§impl WorkspaceProvider for ArenaProvider
impl WorkspaceProvider for ArenaProvider
Source§fn with_worker(
&self,
req: &WorkspaceReq,
f: &mut dyn FnMut(*mut u8, *mut u8, &mut Vec<i64>),
)
fn with_worker( &self, req: &WorkspaceReq, f: &mut dyn FnMut(*mut u8, *mut u8, &mut Vec<i64>), )
f with this thread’s A block, tile and scatter scratch. A
re-entrant call on the same thread gets fresh buffers instead of the
ones its outer call is using.Auto Trait Implementations§
impl !Freeze for ArenaProvider
impl RefUnwindSafe for ArenaProvider
impl Send for ArenaProvider
impl Sync for ArenaProvider
impl Unpin for ArenaProvider
impl UnsafeUnpin for ArenaProvider
impl UnwindSafe for ArenaProvider
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more