Expand description
GC worker threads: the worker::GCWorker struct representing a single worker, the
(crate-private) WorkerGroup that manages all workers, and per-worker shared state.
StructsΒ§
- GCWorker
- A GC worker. This part is privately owned by a worker thread.
- GCWorker
Shared - The struct has one instance per worker, but is shared between workers via the scheduler instance. This structure is used for communication between workers, e.g. adding designated work packets, stealing work packets from other workers, and collecting per-worker statistics.
- Worker
Group π - A worker group to manage all the GC workers.
- Worker
Should πExit - A special error type that indicate a worker should exit. This may happen if the VM needs to fork and asks workers to exit.
EnumsΒ§
- Worker
Creation πState - Stateful part of
WorkerGroup.
ConstantsΒ§
- STAT_
BORROWED_ πMSG - WORKER_
ORDINAL π - Current workerβs ordinal
FunctionsΒ§
- current_
worker_ ordinal - Get current worker ordinal. Return
Noneif the current thread is not a worker.
Type AliasesΒ§
- Poll
Result π - The result type of
GCWorker::pool. Too many functions returnOption<Box<dyn GCWork<VM>>>. In most cases, whenNoneis returned, the caller should try getting work packets from another place. To avoid confusion, we useErr(WorkerShouldExit)to clearly indicate that the worker should exit immediately. - Thread
Id - Represents the ID of a GC worker thread.