You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading the goroutine sample code I thought there was a race condition, as multiple concurrent goroutines are calling append on the same slice in the outer scope.
It turns out that this isn't a race condition, as workflow.Go is different than a goroutine, so it's probably worth explaining this difference in the sample.
The text was updated successfully, but these errors were encountered:
I was actually wondering the same thing. It seems that workflow "goroutines" are not really goroutines in the Go sense.
It should be more clear how workflow goroutines differ from actual goroutines.
I was also wondering what are the advantages/disadvantages of branch or splitmerge-selector vs. goroutine examples. They seem to be serving very similar use cases, very differently. It's probably worth it to cross-reference and compare the two in their respective descriptions.
What are you really trying to do?
I'm learning how to use
workflow.Go
.Reading the goroutine sample code I thought there was a race condition, as multiple concurrent goroutines are calling append on the same slice in the outer scope.
See: https://github.com/temporalio/samples-go/blob/main/goroutine/goroutine_workflow.go
i.e.
It turns out that this isn't a race condition, as
workflow.Go
is different than a goroutine, so it's probably worth explaining this difference in the sample.The text was updated successfully, but these errors were encountered: