Skip to content

Commit 9d4a99a

Browse files
authored
Add note that SetOnActivityHeartbeatListener may be called concurrently (#1818)
* Add note that SetOnActivityHeartbeatListener may be called concurrently * clarify it's the listener, not the func itself that's called concurrently
1 parent f29a8c5 commit 9d4a99a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/workflow_testsuite.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ func (t *TestActivityEnvironment) SetWorkerStopChannel(c chan struct{}) {
281281
// SetOnActivityHeartbeatListener sets a listener that will be called when
282282
// activity heartbeat is called. ActivityInfo is defined in internal package,
283283
// use public type activity.Info instead.
284+
// Note: The provided listener may be called concurrently.
284285
//
285286
// Note: Due to internal caching by the activity system, this may not get called
286287
// for every heartbeat recorded. This is only called when the heartbeat would be
@@ -934,6 +935,7 @@ func (e *TestWorkflowEnvironment) SetOnActivityCanceledListener(
934935

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

0 commit comments

Comments
 (0)