quill
|
Ensures that only one instance of the backend worker is active. More...
#include <BackendWorkerLock.h>
Public Member Functions | |
BackendWorkerLock (std::string const &pid) | |
BackendWorkerLock (BackendWorkerLock const &)=delete | |
BackendWorkerLock & | operator= (BackendWorkerLock const &)=delete |
Ensures that only one instance of the backend worker is active.
This class provides a mechanism to prevent multiple instances of the backend worker from running within the same process. This can occur due to inconsistent linkage (e.g., mixing static and shared libraries), potentially leading to duplicate backend worker threads and unexpected behavior.
On Windows, it utilizes a named mutex, while on POSIX systems, it uses a named semaphore.