From 8e191543d66ec2d4808dda8164ff8be80b16b4e5 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Mon, 24 Jul 2023 19:00:44 -0600 Subject: [PATCH] Added ClearActionQueue --- thread.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/thread.go b/thread.go index 8fdc455..9f07338 100644 --- a/thread.go +++ b/thread.go @@ -194,6 +194,12 @@ func (thread *Thread) QueueAction(end time.Time, action string) { thread.NextAction, thread.TimeoutChan = thread.SoonestAction() } +func (thread *Thread) ClearActionQueue() { + thread.ActionQueue = []QueuedAction{} + thread.NextAction = nil + thread.TimeoutChan = nil +} + func (thread *Thread) ThreadHandle() *Thread { return thread }