macro_rules! freeze_context {
    ($context:ident) => { ... };
}
Expand description

Indicate its safe to begin a garbage collection (like safepoint!) and then “freeze” the specified context.

Until it’s unfrozen, the context can’t be used for allocation. Its roots are marked invalid, since the collector could be relocating them. However, the roots of any parent contexts are still considered valid.

This allows other threads to perform collections without blocking this thread.