libnuklei
base
parallelizer.cpp
Go to the documentation of this file.
1
// (C) Copyright Renaud Detry 2007-2015.
2
// Distributed under the GNU General Public License and under the
3
// BSD 3-Clause License (See accompanying file LICENSE.txt).
4
5
/** @file */
6
7
#include <
nuklei/parallelizer.h
>
8
#include <sys/types.h>
9
#include <sys/wait.h>
10
11
namespace
nuklei
{
12
13
const
std::string parallelizer::TypeNames[] = {
"openmp"
,
"fork"
,
"pthread"
,
"single"
};
14
15
void
parallelizer::reap()
16
{
17
// Reap completed child processes so that we don't end up with zombies.
18
int
status = 0;
19
while
(::waitpid(-1, &status, WNOHANG) > 0) {}
20
}
21
22
}
nuklei
Public namespace.
Definition:
Color.cpp:9
parallelizer.h
© Copyright 2007-2013 Renaud Detry.
Distributed under the terms of the GNU General Public License (GPL).
(See accompanying file
LICENSE.txt
or copy at
http://www.gnu.org/copyleft/gpl.html
.)
Revised Sun Sep 13 2020 19:10:06.