Loading [MathJax]/extensions/tex2jax.js
ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
core
multiproc
src
TPoolWorker.cxx
Go to the documentation of this file.
1
#include "
TPoolWorker.h
"
2
3
//////////////////////////////////////////////////////////////////////////
4
///
5
/// \class TPoolWorker
6
///
7
/// This class works together with TProcPool to allow the execution of
8
/// functions in server processes. Depending on the exact task that the
9
/// worker is required to execute, a different version of the class
10
/// can be called.
11
///
12
/// ### TPoolWorker<F, T, R>
13
/// The most general case, used by
14
/// TProcPool::MapReduce(F func, T& args, R redfunc).
15
/// This worker is build with:
16
/// * a function of signature F (the one to be executed)
17
/// * a collection of arguments of type T on which to apply the function
18
/// * a reduce function with signature R to be used to squash many
19
/// returned values together.
20
///
21
/// ### Partial specializations
22
/// A few partial specializations are provided for less general cases:
23
/// * TPoolWorker<F, T, void> handles the case of a function that takes
24
/// one argument and does not perform reduce operations
25
/// (TProcPool::Map(F func, T& args)).
26
/// * TPoolWorker<F, void, R> handles the case of a function that takes
27
/// no arguments, to be executed a specified amount of times, which
28
/// returned values are squashed together (reduced)
29
/// (TProcPool::Map(F func, unsigned nTimes, R redfunc))
30
/// * TPoolWorker<F, void, void> handles the case of a function that takes
31
/// no arguments and whose arguments are not "reduced"
32
/// (TProcPool::Map(F func, unsigned nTimes))
33
///
34
/// Since all the important data are passed to TPoolWorker at construction
35
/// time, the kind of messages that client and workers have to exchange
36
/// are usually very simple.
37
///
38
//////////////////////////////////////////////////////////////////////////
TPoolWorker.h