- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page