Class CancellationTokenRegistry
- Namespace
- Ando.Server.BuildExecution
- Assembly
- Ando.Server.dll
Thread-safe registry for build cancellation tokens.
public class CancellationTokenRegistry
- Inheritance
-
CancellationTokenRegistry
- Inherited Members
Methods
IsRunning(int)
Checks if a build is currently registered (running).
public bool IsRunning(int buildId)
Parameters
buildIdint
Returns
Register(int, CancellationTokenSource)
Registers a cancellation token source for a build.
public void Register(int buildId, CancellationTokenSource cts)
Parameters
buildIdintThe build ID.
ctsCancellationTokenSourceThe cancellation token source.
TryCancel(int)
Attempts to cancel a build.
public bool TryCancel(int buildId)
Parameters
buildIdintThe build ID to cancel.
Returns
- bool
True if the build was found and cancellation was requested.
Unregister(int)
Unregisters a cancellation token source when a build completes.
public void Unregister(int buildId)
Parameters
buildIdintThe build ID.