- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi! Does TBB has implemented the leader/followers thread pool pattern (link to pdf)? Or I can implement it easily using any template from TBB?
Thanks and regards!
Thanks and regards!
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - rainefan
Hi! Does TBB has implemented the leader/followers thread pool pattern (link to pdf)? Or I can implement it easily using any template from TBB?
Thanks and regards!
Thanks and regards!
no, TBB does not have a leader/followers pattern implemented, and, unfortunately, tasks and I/O do not mix very well. The support for I/O that TBB currently has is a tbb_thread wrapper around native threads API. However tbb_thread is a portable solution and you could implement leader/followers pattern on the side of your application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Anton Pegushin (Intel)
Hello,
no, TBB does not have a leader/followers pattern implemented, and, unfortunately, tasks and I/O do not mix very well. The support for I/O that TBB currently has is a tbb_thread wrapper around native threads API. However tbb_thread is a portable solution and you could implement leader/followers pattern on the side of your application.
Thank you so much for the quick reply.
But does it means that TBB is not indicated (efficient) to process I/O (networking, fo example) ?
Thanks again for any tip!
Regards,
Raine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - rainefan
But does it means that TBB is not indicated (efficient) to process I/O (networking, fo example) ?
TBB tasks are executed by threads. If a task has a blocking I/O call, it will block the thread executing it, leading to CPU under-utilization despite other tasks available for execution. In some cases, due to some TBB task scheduler implementation details, it may lead to progress being blocked for task trees that donot directly depend on the task waiting for I/O. In some cases, it may lead to idle-spinning of other threads. So basically TBB tasks may use I/O, though with the price of possible suboptimal work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - rainefan
Hi! Does TBB has implemented the leader/followers thread pool pattern (link to pdf)? Or I can implement it easily using any template from TBB?
Thanks and regards!
Thanks and regards!
In my opinion, TBB pipeline more or less fits the pattern for what they call "unbound thread-handle association". For the case where an event should be processed by a particular thread that earlier took care of its predecessor, there is no ready solution.
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