Skip to content

Commit

Permalink
Add note that SetOnActivityHeartbeatListener may be called concurrent…
Browse files Browse the repository at this point in the history
…ly (#1818)

* Add note that SetOnActivityHeartbeatListener may be called concurrently

* clarify it's the listener, not the func itself that's called concurrently
  • Loading branch information
yuandrew authored Feb 11, 2025
1 parent f29a8c5 commit 9d4a99a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/workflow_testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ func (t *TestActivityEnvironment) SetWorkerStopChannel(c chan struct{}) {
// SetOnActivityHeartbeatListener sets a listener that will be called when
// activity heartbeat is called. ActivityInfo is defined in internal package,
// use public type activity.Info instead.
// Note: The provided listener may be called concurrently.
//
// Note: Due to internal caching by the activity system, this may not get called
// for every heartbeat recorded. This is only called when the heartbeat would be
Expand Down Expand Up @@ -934,6 +935,7 @@ func (e *TestWorkflowEnvironment) SetOnActivityCanceledListener(

// SetOnActivityHeartbeatListener sets a listener that will be called when activity heartbeat.
// Note: ActivityInfo is defined in internal package, use public type activity.Info instead.
// Note: The provided listener may be called concurrently.
//
// Note: Due to internal caching by the activity system, this may not get called
// for every heartbeat recorded. This is only called when the heartbeat would be
Expand Down

0 comments on commit 9d4a99a

Please sign in to comment.