Parallel iteration over a stream, with optional addition of more work. More...
#include <parallel_while.h>
 
  
 | Public Types | |
| typedef Body::argument_type | value_type | 
| Type of items. | |
| Public Member Functions | |
| parallel_while () | |
| Construct empty non-running parallel while. | |
| ~parallel_while () | |
| Destructor cleans up data members before returning. | |
| template<typename Stream > | |
| void | run (Stream &stream, const Body &body) | 
| Apply body.apply to each item in the stream.  More... | |
| void | add (const value_type &item) | 
| Add a work item while running.  More... | |
Parallel iteration over a stream, with optional addition of more work.
The Body b has the requirement: 
 "b(v)" 
 "b.argument_type" 
 where v is an argument_type 
| void tbb::parallel_while< Body >::add | ( | const value_type & | item) | 
Add a work item while running.
Should be executed only by body.apply or a thread spawned therefrom.
| void tbb::parallel_while< Body >::run | ( | Stream & | stream, | 
| const Body & | body | ||
| ) | 
Apply body.apply to each item in the stream.
A Stream s has the requirements 
 "S::value_type" 
 "s.pop_if_present(value) is convertible to bool