| The Gaudi Framework v29r1 (5cd95fa2)

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

- File List
- File Members

Functions
quickstart.cpp File Reference

Quick start example. More...

`#include <iostream>`
`#include <boost/threadpool.hpp>`
Include dependency graph for quickstart.cpp:

Go to the source code of this file.

## Functions
void | first_task ()
void | second_task ()
int | main (int argc, char *argv[])

## Detailed Description

Quick start example.

This is a very simple example which can be used to configure the threadpool environment on your system.

Copyright (c) 2005-2006 Philipp Henkel

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

http://threadpool.sourceforge.net

Definition in file quickstart.cpp.

## Function Documentation

void first_task | ( |  | ) |

Definition at line 24 of file quickstart.cpp.

24 { cout << "first task is running\n"; }
std::cout

int main | ( | int | argc,
|  | char * | argv[]
| ) |  |

Definition at line 28 of file quickstart.cpp.

29 {
30 // Create fifo thread pool container with two threads.
31 pool tp( 2 );
32
33 // Add some tasks to the pool.
34 tp.schedule( &first_task );
35 tp.schedule( &second_task );
36
37 // Wait until all tasks are finished.
38 tp.wait();
39
40 // Now all tasks are finished!
41 return ( 0 );
42 }
first_task
void first_task()
Definition: quickstart.cpp:24
second_task
void second_task()
Definition: quickstart.cpp:26
pool
Definition: PoolClasses.h:11
compareRootHistos.tp
tuple tp
Definition: compareRootHistos.py:417

void second_task | ( |  | ) |

Definition at line 26 of file quickstart.cpp.

26 { cout << "second task is running\n"; }
std::cout