Skip to content

Commit

Permalink
Add read lock to task ToString method
Browse files Browse the repository at this point in the history
  • Loading branch information
mye956 committed Aug 19, 2024
1 parent 6e5e459 commit e91cbde
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agent/api/task/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -2910,6 +2910,9 @@ func (task *Task) GetExecutionStoppedAt() time.Time {

// String returns a human-readable string representation of this object
func (task *Task) String() string {
task.lock.RLock()
defer task.lock.RUnlock()

return task.stringUnsafe()
}

Expand Down

0 comments on commit e91cbde

Please sign in to comment.