Skip to content

Commit 59ff055

Browse files
authored
Update doc comments (#1000)
We removed the feature for letting the coordinator call both `stop_all_mutators` and `resume_mutators` since #794 and #814. The documentation should reflect that.
1 parent abd38ec commit 59ff055

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/vm/collection.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,25 @@ pub enum GCThreadContext<VM: VMBinding> {
1212
/// VM-specific methods for garbage collection.
1313
pub trait Collection<VM: VMBinding> {
1414
/// Stop all the mutator threads. MMTk calls this method when it requires all the mutator to yield for a GC.
15-
/// This method is called by a single thread in MMTk (the GC controller).
1615
/// This method should not return until all the threads are yielded.
1716
/// The actual thread synchronization mechanism is up to the VM, and MMTk does not make assumptions on that.
1817
/// MMTk provides a callback function and expects the binding to use the callback for each mutator when it
1918
/// is ready for stack scanning. Usually a stack can be scanned as soon as the thread stops in the yieldpoint.
2019
///
2120
/// Arguments:
22-
/// * `tls`: The thread pointer for the GC controller/coordinator.
21+
/// * `tls`: The thread pointer for the GC worker.
2322
/// * `mutator_visitor`: A callback. Call it with a mutator as argument to notify MMTk that the mutator is ready to be scanned.
2423
fn stop_all_mutators<F>(tls: VMWorkerThread, mutator_visitor: F)
2524
where
2625
F: FnMut(&'static mut Mutator<VM>);
2726

2827
/// Resume all the mutator threads, the opposite of the above. When a GC is finished, MMTk calls this method.
2928
///
29+
/// This method may not be called by the same GC thread that called `stop_all_mutators`.
30+
///
3031
/// Arguments:
31-
/// * `tls`: The thread pointer for the GC controller/coordinator.
32+
/// * `tls`: The thread pointer for the GC worker. Currently it is the tls of the embedded `GCWorker` instance
33+
/// of the coordinator thread, but it is subject to change, and should not be depended on.
3234
fn resume_mutators(tls: VMWorkerThread);
3335

3436
/// Block the current thread for GC. This is called when an allocation request cannot be fulfilled and a GC

0 commit comments

Comments
 (0)