e-register state change

This commit is contained in:
Stoyan Zlatev
2025-04-29 13:17:33 +02:00
parent d5b6e033e4
commit afc19d9fd5
3 changed files with 29 additions and 16 deletions
@@ -64,39 +64,39 @@
public void SetCancelled()
{
this.awaiter.Set();
this.State = SIRTTaskState.Cancelled;
this.awaiter.Set();
}
public void SetCompleted()
{
this.awaiter.Set();
this.State = SIRTTaskState.Completed;
this.awaiter.Set();
}
public void SetPending()
{
this.awaiter.Set();
this.awaiter.Reset();
this.State = SIRTTaskState.Pending;
this.awaiter.Set();
}
public void SetRunning()
{
this.State = SIRTTaskState.Running;
this.awaiter.Reset();
}
public virtual byte[] Start()
{
this.awaiter.Reset();
this.State = SIRTTaskState.Running;
this.Timestamp = DateTimeOffset.UtcNow;
this.awaiter.Reset();
return this.request.GetBytes();
}