- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a simple example of what I would like to do :
m_pPipeline = new tbb::pipeline();
m_pPipeline->add_filter(*m_pElem1);
m_pPipeline->add_filter(*m_pElem2);
try{
m_pPipeline->run(2);
}
catch(EfromElem1& eElem1)
{
printf("Exception sent from the pipeline(Elem1)");
}
catch(EfromElem2& eElem2)
{
printf("Exception sent from the pipeline (Elem2)");
}
I can't find anything matching this kind of behaviour..
Is it possible? relevant? only in my dream?
Thanks for your answers.
Jeremie.
m_pPipeline = new tbb::pipeline();
m_pPipeline->add_filter(*m_pElem1);
m_pPipeline->add_filter(*m_pElem2);
try{
m_pPipeline->run(2);
}
catch(EfromElem1& eElem1)
{
printf("Exception sent from the pipeline(Elem1)");
}
catch(EfromElem2& eElem2)
{
printf("Exception sent from the pipeline (Elem2)");
}
I can't find anything matching this kind of behaviour..
Is it possible? relevant? only in my dream?
Thanks for your answers.
Jeremie.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please first consult section "9 Exceptions" in "Reference (Open Source).pdf" revision 1.13 or later (possibly in the Commercial Documentation). If it doesn't contain the right information for you, please come back here with a more specific question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code implies exact propagation of exceptions across threads; and this is not possible until C++0x.
TBB uses captured_exception and movable_exception classes to use with its parallel algorithms. The former is enough to transfer information about an std::exception and its derivatives, while the latter is useful to transfer some user-defined data.
In addition to the Reference manual, you might read a series of blogs written by Andrey Marochko.
TBB uses captured_exception and movable_exception classes to use with its parallel algorithms. The former is enough to transfer information about an std::exception and its derivatives, while the latter is useful to transfer some user-defined data.
In addition to the Reference manual, you might read a series of blogs written by Andrey Marochko.

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