pub trait Alloc {
// Required methods
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<ProcState>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn extent(&self) -> &Extent;
fn world_id(&self) -> &WorldId;
fn transport(&self) -> ChannelTransport;
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AllocatorError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn shape(&self) -> Shape { ... }
fn stop_and_wait<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AllocatorError>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
An alloc is a specific allocation, returned by an Allocator
.
Required Methods§
Sourcefn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<ProcState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<ProcState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the next proc event. None
indicates that there are
no more events, and that the alloc is stopped.
Sourcefn world_id(&self) -> &WorldId
fn world_id(&self) -> &WorldId
The world id of this alloc, uniquely identifying the alloc. Note: This will be removed in favor of a different naming scheme, once we exise “worlds” from hyperactor core.
Sourcefn transport(&self) -> ChannelTransport
fn transport(&self) -> ChannelTransport
The channel transport used the procs in this alloc.
Sourcefn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AllocatorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AllocatorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop this alloc, shutting down all of its procs. A clean shutdown should result in Stop events from all allocs, followed by the end of the event stream.
Provided Methods§
Sourcefn stop_and_wait<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AllocatorError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn stop_and_wait<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AllocatorError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Stop this alloc and wait for all procs to stop. Call will block until all ProcState events have been drained.