Fix locking

graph-rework-2
noah metz 2023-06-26 23:15:40 -06:00
parent cf8648f615
commit 856867fb10
1 changed files with 7 additions and 0 deletions

@ -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())