Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 857 Bytes

File metadata and controls

22 lines (16 loc) · 857 Bytes

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.

Steps to run this sample:

  1. Run a Temporal Service
  2. Run the following command to start the worker
go run goroutine/worker/main.go
  1. Run the following command to start the example
go run goroutine/starter/main.go