This sample Workflow Definition demonstrates how to use multiple workflow safe goroutines (instead of native ones) to
process multiple sequences of activities in parallel.
In Temporal Workflow Definition, you should not use go keyword to start goroutines. Instead, you use the workflow.Go
function, which spawns a coroutine that is never run in parallel, but instead deterministically.
To see more information on goroutines and multithreading, see our docs on Go SDK multithreading.
- Run a Temporal Service
- Run the following command to start the worker
go run goroutine/worker/main.go
- Run the following command to start the example
go run goroutine/starter/main.go