Child tasks and worker slots #1802
-
When child tasks are spawned then awaited as in https://docs.hatchet.run/home/child-spawning, does the parent still take up a worker slot? Or is the slot kept unless there's a manual slot release? After a manual slot release is it possible to reacquire the slot? Let's say the are N worker slots and N parent tasks are run, and they all wait for child tasks to complete. If the parents keep their slots, the children won't have a chance to run, so what's the recommended way to avoid this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Sorry for the delay here -- |
Beta Was this translation helpful? Give feedback.
Sorry for the delay here --
Yes, a parent takes up a slot until it completes or you manually release the slot.
We recommend either adding additional slots, creating multiple workers for potentially blocking pools, or run parents as durable tasks (https://docs.hatchet.run/home/durable-execution) that utilize a different slot pool.