Tempolar is Thread-safe?

Is workflow execution or activity working as a thread-safe ?

I think a workflow/activity is only thread-safe if you implemented it that way. Temporal could schedule your workflows/activities on seperate workers, which could help surface concurrency-related bugs, but it’s ultimately on you to implement thread-safety into your program.

Workflow code is already thread-safe, and the use of standard Java thread safety primitives is prohibited in the workflow code.

Activity implementation must be thread-safe as it can be called by multiple threads simultaneously.

1 Like