Kea  2.1.7-git
isc::util::MultiThreadingCriticalSection Class Reference

RAII class creating a critical section. More...

#include <multi_threading_mgr.h>

+ Inheritance diagram for isc::util::MultiThreadingCriticalSection:

Public Member Functions

 MultiThreadingCriticalSection ()
 Constructor. More...
 
virtual ~MultiThreadingCriticalSection ()
 Destructor. More...
 

Detailed Description

RAII class creating a critical section.

Note
: everything here MUST be used ONLY from the main thread. When called from a thread of the pool it can deadlock.
: the multi-threading mode MUST NOT be changed in the RAII MultiThreadingCriticalSection body.
: starting and stopping the dhcp thread pool should be handled in the main thread, if done on one of the processing threads will cause a deadlock. This is mainly useful in hook commands which handle configuration changes.

Definition at line 340 of file multi_threading_mgr.h.

Constructor & Destructor Documentation

◆ MultiThreadingCriticalSection()

isc::util::MultiThreadingCriticalSection::MultiThreadingCriticalSection ( )

Constructor.

Entering the critical section. The dhcp thread pool instance will be stopped so that all configuration changes can be safely applied.

Definition at line 222 of file multi_threading_mgr.cc.

References isc::util::MultiThreadingMgr::enterCriticalSection(), and isc::util::MultiThreadingMgr::instance().

+ Here is the call graph for this function:

◆ ~MultiThreadingCriticalSection()

isc::util::MultiThreadingCriticalSection::~MultiThreadingCriticalSection ( )
virtual

Destructor.

Leaving the critical section. The dhcp thread pool instance will be started according to the new configuration.

Definition at line 226 of file multi_threading_mgr.cc.

References isc::util::MultiThreadingMgr::exitCriticalSection(), and isc::util::MultiThreadingMgr::instance().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: