From 856867fb10d2072e3bb7fbe86030e2b1375cc03c Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Mon, 26 Jun 2023 23:15:40 -0600 Subject: [PATCH] Fix locking --- thread.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thread.go b/thread.go index 33317a1..96d82e1 100644 --- a/thread.go +++ b/thread.go @@ -323,12 +323,19 @@ func RunThread(ctx * GraphContext, thread Thread) error { thread_state := states[0].(ThreadState) err := thread_state.Stop() return nil, err + }) if err != nil { ctx.Log.Logf("thread", "THREAD_RUN_STOP_ERR: %e", err) return err } + err = UnlockLockable(ctx, thread, thread, nil) + if err != nil { + ctx.Log.Logf("thread", "THREAD_RUN_UNLOCK_ERR: %e", err) + return err + } + SendUpdate(ctx, thread, NewSignal(thread, "thread_done")) ctx.Log.Logf("thread", "THREAD_RUN_DONE: %s", thread.ID())