Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One more step towards interleaved GC. The
GcScope
ZST (zero-sized type) carries two lifetimes, the "scope" lifetime and the "GC" lifetime. The GC lifetime is somewhat related to the&mut Agent
borrow lifetime in that code that does not receive&mut Agent
cannot perform GC, but the intention is that neither can it without theGcScope
's'gc
lifetime. In the future, if/once&mut Agent
becomes&Agent
then the GC will become possible with just&Agent + 'gc
.I could probably maybe move this lifetime into a
GcContext
that is a#[repr(transparent)]
overAgent
with the GC and Scope lifetimes embedded into that... And thenNoGcContext
that is similar but now with a shared borrow over the GC lifetime...I'll try that in a separate branch.