Structs§
- A GC worker. This part is privately owned by a worker thread.
- 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 ofWorkerGroup
.
Constants§
- STAT_
BORROWED_ πMSG - WORKER_
ORDINAL πCurrent workerβs ordinal
Functions§
- Get current worker ordinal. Return
None
if the current thread is not a worker.
Type Aliases§
- Poll
Result πThe result type ofGCWorker::pool
. Too many functions returnOption<Box<dyn GCWork<VM>>>
. In most cases, whenNone
is 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. - Represents the ID of a GC worker thread.