- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone worked on a thread group concept for TBB? I know that Boost has a thread group, and they aren't that difficult to implement. Has anyone else implemented one for TBB?
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jaredkeithwhite
Has anyone worked on a thread group concept for TBB? I know that Boost has a thread group, and they aren't that difficult to implement. Has anyone else implemented one for TBB?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What I really want is just a counterparty to boost's thread_group, which allows me to join_all().
There are a couple of instances where I can't use the task concept (namely, when receiving asynchronous IO), and I would like to be able to spawn a few threads and join to them all from my main application thread.
Quoting - Anton Pegushin (Intel)
There are a couple of instances where I can't use the task concept (namely, when receiving asynchronous IO), and I would like to be able to spawn a few threads and join to them all from my main application thread.
Quoting - Anton Pegushin (Intel)
Hi, I think in terms of TBB that would be task_group... Meaning an interface that wraps parallel execution of functions inside tasks. Is that what you'd be interested in seeing in TBB?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jaredkeithwhite
I have not used it myself, but will it looks like the tbb_thread class has a join method.
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It does indeed. My suggestion for a thread group is more or less wrapper functionality.
Quoting - pvonkaenel
Quoting - pvonkaenel
I have not used it myself, but will it looks like the tbb_thread class has a join method.
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems to me, you might also find the method:
void task::wait_for_all();
helpful.
void task::wait_for_all();
helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Much appreciated. I will take a look.
Note that I'm not using tasks for my particular problem -- I have to use user threads directly, because this is asynchronous IO that I'm waiting to complete.
Quoting - bartlomiej
Note that I'm not using tasks for my particular problem -- I have to use user threads directly, because this is asynchronous IO that I'm waiting to complete.
Quoting - bartlomiej
It seems to me, you might also find the method:
void task::wait_for_all();
helpful.
void task::wait_for_all();
helpful.
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