Type Alias mmtk::scheduler::worker::PollResult
source · pub(crate) type PollResult<VM> = Result<Box<dyn GCWork<VM>>, WorkerShouldExit>;
Expand description
The result type of GCWorker::pool
.
Too many functions return Option<Box<dyn GCWork<VM>>>
. In most cases, when None
is
returned, the caller should try getting work packets from another place. To avoid confusion,
we use Err(WorkerShouldExit)
to clearly indicate that the worker should exit immediately.
Aliased Type§
enum PollResult<VM> {
Ok(Box<dyn GCWork<VM>>),
Err(WorkerShouldExit),
}
Variants§
Ok(Box<dyn GCWork<VM>>)
Contains the success value
Err(WorkerShouldExit)
Contains the error value