Setting Depth Manually - Any Issues?

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.


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

Leave a Comment

Please sign in to add a comment. Not a member? Join today