Open Rails

LoaderProcess.CancellationToken Property

[This is preliminary documentation and subject to change.]

Returns a token (copyable object) which can be queried for the cancellation (termination) of the loader.

public CancellationToken CancellationToken { public get; }

Remarks

All loading code should periodically (e.g. between loading each file) check the token and exit as soon as it is cancelled (IsCancellationRequested).

Reading IsCancellationRequested causes the WatchdogToken to be pinged, informing the WatchdogProcess that the loader is still responsive. Therefore the remarks about the Ping method apply to the token regarding when it should and should not be used.

See Also

LoaderProcess Class | Orts.Viewer3D.Processes Namespace