BRE12
Public Types | Public Member Functions | List of all members
tbb::parallel_while< Body > Class Template Reference

Parallel iteration over a stream, with optional addition of more work. More...

#include <parallel_while.h>

Inheritance diagram for tbb::parallel_while< Body >:

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...
 

Detailed Description

template<typename Body>
class tbb::parallel_while< Body >

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

Member Function Documentation

§ add()

template<typename Body >
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.

§ run()

template<typename Body >
template<typename Stream >
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


The documentation for this class was generated from the following file: