pub struct AsyncFileOptions { /* private fields */ }Expand description
The sizes of the queues between an async handle and its owner thread.
The default holds 64 pending commands and 256 undelivered events. A recorder
separately admits up to 64 pending finalization waits. Each
capacity must be from 1 through 4096; the create_with_options
functions of AsyncFilePlayer and AsyncFileRecorder refuse any
other with Error::InvalidInput.
Implementations§
Source§impl AsyncFileOptions
impl AsyncFileOptions
Sourcepub fn configured_command_capacity(&self) -> usize
pub fn configured_command_capacity(&self) -> usize
Requested pending command capacity.
Sourcepub fn configured_event_capacity(&self) -> usize
pub fn configured_event_capacity(&self) -> usize
Requested undelivered event capacity.
Sourcepub fn command_capacity(self, capacity: usize) -> Self
pub fn command_capacity(self, capacity: usize) -> Self
Set how many commands may wait for the owner thread. A command
submitted to a full queue fails at once with Error::QueueFull and
QueueLimit::FileCommands. A request to stop is the exception: one
is accepted beyond a full queue, so that a stop is not lost for want of
room; see FileOperation.
For recorders, this also sets an independent limit on submitted
finish and
wait_for_finish waits, including
queued, registered and settling waits. A full wait budget reports
QueueLimit::FileFinishWaits, while ordinary commands, stop requests,
close and abandon keep their own admission rules. Cancelling a submitted
wait restores its place when the owner removes it; an accepted finish
still requests the stop.
Sourcepub fn event_capacity(self, capacity: usize) -> Self
pub fn event_capacity(self, capacity: usize) -> Self
Set how many events may wait to be received. When the queue is full the oldest event is discarded and counted.
A recorder’s session report is updated before an event enters this queue, so an event discarded here never affects what the report says.