Skip to content

Commit

Permalink
Code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Jul 15, 2024
1 parent d0c557b commit 9adf904
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ type (

// SignalWorkflow sends a signals to a running workflow.
// - workflow ID of the workflow.
// - runID can be default(empty string). If empty string then it will pick the running execution of that workflow ID.
// - runID can be default(empty string). If set to empty string, then it will pick the running execution of that workflow ID.
// - signalName name to identify the signal.
// The errors it can return:
// - serviceerror.NotFound
Expand Down
10 changes: 5 additions & 5 deletions internal/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ type (
// json.Unmarshal.
ReceiveAsync(valuePtr interface{}) (ok bool)

// ReceiveAsyncWithMoreFlag is the same as ReceiveAsync but with an extra return value `more` that indicates
// whether the channel contains more data. `more` is false when the channel is closed.
// ReceiveAsyncWithMoreFlag is the same as ReceiveAsync but with an extra return value more that indicates
// whether the channel contains more data. more is false when the channel is closed.
//
// Note, values should not be reused for extraction here because merging on top of existing values may result in
// unexpected behavior similar to json.Unmarshal.
Expand All @@ -146,7 +146,7 @@ type (
ReceiveChannel
}

// Selector must be used by workflow code instead of native go `select`.
// Selector must be used by workflow code instead of native go select.
// Use workflow.NewSelector(ctx) to create a selector.
Selector interface {
// AddReceive registers a callback function to be called when a channel has a message to receive.
Expand Down Expand Up @@ -531,7 +531,7 @@ func NewSemaphore(ctx Context, n int64) Semaphore {
return &semaphoreImpl{size: n}
}

// Go creates a new coroutine in workflow code. It has similar semantics to native goroutines, but these must not be
// Go creates a new coroutine in workflow code. It has similar semantics to native goroutines, which must not be
// used in workflow code.
func Go(ctx Context, f func(ctx Context)) {
assertNotInReadOnlyState(ctx)
Expand All @@ -540,7 +540,7 @@ func Go(ctx Context, f func(ctx Context)) {
}

// GoNamed creates a new coroutine in workflow code, with a given human-readable name. It has similar semantics to
// native goroutines, but these must not be used in workflow code. Name appears in stack traces that are blocked on this
// native goroutines, which must not be used in workflow code. name appears in stack traces that are blocked on this
// Channel.
func GoNamed(ctx Context, name string, f func(ctx Context)) {
assertNotInReadOnlyState(ctx)
Expand Down

0 comments on commit 9adf904

Please sign in to comment.