Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AJ13
New Contributor I
36 Views

Setting Depth Manually - Any Issues?

Are there any issues I should be aware of when manually setting the depth of tasks? This will be useful for some of the research I am doing.

In particular, I might set task depths such that there are gaps. For instance, I might have tasks at depth 10, 10000, 100023, and other strange numbers.

Thanks.
0 Kudos
1 Reply
Alexey_K_Intel3
Employee
36 Views

If you spawn a task_list, all tasks in the list must have the same depth.
In current implementation, task pool has an array of list of tasks with the same depth. The array can grow dynamically on demand, but never shrinks. So if you need a task of depth 100023 just once, think whether you really need it :)
If a task spawns children and waits for those, it won't execute tasks with smaller depth during the wait. Thus children should better have the depth not smaller than that of parent waiting for their completion, otherwise you might end up with adeadlock.