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 28, 2024
1 parent fec74a8 commit a876998
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 @@ -2916,6 +2916,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 a876998

Please sign in to comment.