- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm basically a beginner in this world of parallel computing. I've reading the tutorial and I have a question concerning tasks.
Having a root task, two child tasks and a continuation task, do the root and the continuation tasks run with a single thread each or they can be executed with, for example, two threads?
Thanks.
I'm basically a beginner in this world of parallel computing. I've reading the tutorial and I have a question concerning tasks.
Having a root task, two child tasks and a continuation task, do the root and the continuation tasks run with a single thread each or they can be executed with, for example, two threads?
Thanks.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I mean, do the root task, and the continuation task once the childs have finished, execute concurrently or do they run serially, while the childs are executed in parallel?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the root and continuation tasks are separate (not using recycle_as_continuation), they may indeed execute concurrently. What do you have in mind?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I thought that the root and continuation task would be executed with one thread each only, while the child tasks would be executed with various threads, if available.
So the root and continuation tasks can be executed with more than a thread each, can't they?
Thanks a lot!
So the root and continuation tasks can be executed with more than a thread each, can't they?
Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Concurrently means that the original parent and its continuation could be executing at the same time, each in its own thread.
Note that the continuation will follow all the child tasks, and each of them only gets executed after it was spawned, so the overlap is only partial, and you probably wouldn't do anything substantial in the original parent after spawning the children.
(Note that "one thread each" and "more than a thread each" mean something else than what I think you intend.)
P.S.: I should probably have referred to recycle_as_safe_continuation() above, instead of just recycle_as_continuation().
Note that the continuation will follow all the child tasks, and each of them only gets executed after it was spawned, so the overlap is only partial, and you probably wouldn't do anything substantial in the original parent after spawning the children.
(Note that "one thread each" and "more than a thread each" mean something else than what I think you intend.)
P.S.: I should probably have referred to recycle_as_safe_continuation() above, instead of just recycle_as_continuation().

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