Reputation: 16
SDK : Temporal Java SDK
In the workflow code, we're trying to resolve the promise with get() method call, since its blocking call, i've below queries team, can you please clarify on this -
whether the workflow worker's main thread will be blocked or will it initiate new thread and resolve that promise. whether the workflow worker will get into sleep mode and it will get invoked when promise gets resolved.
In high level, we understand that get() method will block the main workflow thread.
Upvotes: 0
Views: 247
Reputation: 21
A temporal worker can have many threads (i belive default is 600).
When you call get
on a Promise. current execution flow will only continue after promise gets resolved. so, it surely will block that particular thread. but your workflow's signal / query will still work in other threads
Upvotes: 0