- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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

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

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.

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:

- parallel_while.h

Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.