Add cancellation reason tracking with user/system codes and UI

This commit is contained in:
2026-07-08 17:31:22 -04:00
parent 3c1bbce9e7
commit 69c4898a56
9 changed files with 137 additions and 32 deletions
+6 -1
View File
@@ -33,10 +33,15 @@ func TestQueue(t *testing.T) {
t.Errorf("Enqueue(1) again = %v, want ErrAlreadyRunning", err)
}
q.Cancel(1)
q.Cancel(1, true)
if !cancelCalled {
t.Error("Cancel should have called the cancel func")
}
if !q.IsCancelledByUser(1) {
t.Error("IsCancelledByUser should return true after Cancel(1, true)")
}
q.Dequeue(1)
q.Dequeue(1)
if q.IsRunning(1) {