Skip to content

Commit

Permalink
Fix issue temporalio#1703
Browse files Browse the repository at this point in the history
protect the write to the map env.activities with env.locker
  • Loading branch information
delanne committed Nov 5, 2024
1 parent 9d74a90 commit 69b2c64
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/internal_workflow_testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,8 @@ func (env *testWorkflowEnvironmentImpl) getActivityHandle(activityID, runID stri
}

func (env *testWorkflowEnvironmentImpl) setActivityHandle(activityID, runID string, handle *testActivityHandle) {
env.locker.Lock()
defer env.locker.Unlock()
env.activities[env.makeUniqueActivityID(activityID, runID)] = handle
}

Expand Down

0 comments on commit 69b2c64

Please sign in to comment.