Concept Spawning Process Group

Contents

Description

A spawning process group

Refinement of

Associated types

Concept tag PG::communication_category Must be convertible to spawning_process_group_tag.

Notation

PG
A type that models the Spawning Process Group concept.
pg
An object of type PG.
n
An object of type PG::process_size_type.
f
A function object accepting no parameters, whose return value will be ignored.

Valid Expressions

Name Expression Type Semantics
Number of processing units. processing_units(pg) Convertible to process_size_type Returns the number of processing units that can be available. If zero, then the number of processing units is "unlimited".
Spawn processes spawn(pg, n, f)   Creates n processes. Each process receives a copy of f, which it executes. The process group pg will provide unique process IDs to each process and (bool)pg will be true within those processes.
Join processes join(pg)   Wait until all processes that have been spawned have completed. Only valid in the process that executed spawn.

Models


Copyright (C) 2005 The Trustees of Indiana University.

Authors: Douglas Gregor and Andrew Lumsdaine