Kea
1.5.0
thread.h
Go to the documentation of this file.
1
// Copyright (C) 2012-2018 Internet Systems Consortium, Inc. ("ISC")
2
//
3
// This Source Code Form is subject to the terms of the Mozilla Public
4
// License, v. 2.0. If a copy of the MPL was not distributed with this
5
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7
#ifndef KEA_THREAD_H
8
#define KEA_THREAD_H
9
10
#include <
exceptions/exceptions.h
>
11
12
#include <boost/noncopyable.hpp>
13
#include <boost/function.hpp>
14
15
namespace
isc
{
16
namespace
util {
22
namespace
thread {
23
36
class
Thread
:
public
boost::noncopyable {
37
public
:
43
class
UncaughtException
:
public
isc::Exception
{
44
public
:
45
UncaughtException
(
const
char
* file,
size_t
line,
const
char
*
what
) :
46
Exception
(file, line,
what
)
47
{}
48
};
49
70
Thread
(
const
boost::function<
void
()>&
main
);
71
82
~Thread
();
83
94
void
wait
();
95
private
:
96
class
Impl;
97
Impl* impl_;
98
};
99
101
typedef
boost::shared_ptr<Thread>
ThreadPtr
;
102
103
}
104
}
105
}
106
107
#endif
main
int main(int argc, char *argv[])
Definition:
agent/main.cc:16
isc::util::thread::Thread::UncaughtException::UncaughtException
UncaughtException(const char *file, size_t line, const char *what)
Definition:
thread.h:45
exceptions.h
isc::Exception::what
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Definition:
exceptions/exceptions.cc:32
isc::util::thread::Thread
A separate thread.
Definition:
thread.h:36
isc::util::thread::Thread::wait
void wait()
Wait for the thread to terminate.
Definition:
thread.cc:156
isc::util::thread::Thread::~Thread
~Thread()
Destructor.
Definition:
thread.cc:144
isc::util::thread::Thread::Thread
Thread(const boost::function< void()> &main)
Create and start a thread.
Definition:
thread.cc:125
isc::util::thread::Thread::UncaughtException
There's an uncaught exception in a thread.
Definition:
thread.h:43
isc::Exception
This is a base class for exceptions thrown from the DNS library module.
Definition:
exceptions/exceptions.h:23
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition:
agent_parser.cc:144
isc::util::thread::ThreadPtr
boost::shared_ptr< Thread > ThreadPtr
Thread pointer type.
Definition:
thread.h:101
src
lib
util
threads
thread.h
Generated on Wed Jan 23 2019 23:03:25 for Kea by
1.8.15