Skip to content

Commit

Permalink
d.mutex.Unlock()
Browse files Browse the repository at this point in the history
The logic of the function seems like a defer wouldn't unlock in order for that deferred function to handle updating the d.executing state.
  • Loading branch information
jackdawm authored Jul 21, 2023
1 parent 8f13360 commit f8ab872
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/internal_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -1056,9 +1056,11 @@ func (d *dispatcherImpl) newState(name string) *coroutineState {
func (d *dispatcherImpl) ExecuteUntilAllBlocked(deadlockDetectionTimeout time.Duration) (err error) {
d.mutex.Lock()
if d.closed {
d.mutex.Unlock()
panic("dispatcher is closed")
}
if d.executing {
d.mutex.Unlock()
panic("call to ExecuteUntilAllBlocked (possibly from a coroutine) while it is already running")
}
d.executing = true
Expand Down

0 comments on commit f8ab872

Please sign in to comment.