Skip to content

Grain.DelayDeactivation(TimeSpan)

DelayDeactivation(TimeSpan)

View source
protected void DelayDeactivation(TimeSpan timeSpan)
Delay Deactivation of this activation at least for the specified time duration.

A positive timeSpan value means “prevent GC of this activation for that time span”.

A System.TimeSpan.Zero value means “cancel the previous setting of the Grain call and make this activation behave based on the regular Activation Garbage Collection settings”.

A System.Threading.Timeout.InfiniteTimeSpan value means “delay deactivation indefinitely”.

Grain would undo / override any current “keep alive” setting, making this grain immediately available for deactivation.

Parameters

timeSpanTimeSpan