Class ModuleContextMonitor
Tells how many module load contexts are in memory and how many of them should be gone. A context should be gone
once Tsak let it go (): a version replaced by a hot swap or a
package reload and dropped from the rollback history, a removed module, the throwaway context of a package check.
With false such a context never leaves memory, so it counts as orphaned
from the moment it is let go. A collectible one is checked after the operation that let it go, off the hot path:
a few full collections with growing pauses between them. One still alive after the last of them is logged as a
warning and counted. A context that leaves memory later stops being counted, because the count is taken from the
module contexts still in memory ().
public sealed class ModuleContextMonitor
Inheritance
Properties
MaxOrphanedContexts
The limit above which the node should be restarted ().
public int MaxOrphanedContexts { get; }
ModuleContextsAlive
Module load contexts in memory: the live modules, the rollback history, the orphaned ones and the ones still
public int ModuleContextsAlive { get; }
Notice
What to do about the orphaned contexts: null within the limit, the restart advice above it.
public string? Notice { get; }
OrphanedModuleContexts
Module load contexts in memory that Tsak let go: not collectible, or collectible and still alive after the
public int OrphanedModuleContexts { get; }
Methods
ScheduleCheck()
Checks the contexts let go since the last check, in the background. Calls while a check runs fold into one more
public void ScheduleCheck()