From ffc62c792c9a5196cb4ce7a353287dfe20db6524 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Fri, 9 Oct 2026 14:12:35 +0200 Subject: New upstream version 3.3.0~beta1+dfsg --- lib/DecoderWorkerLock.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/DecoderWorkerLock.hpp (limited to 'lib/DecoderWorkerLock.hpp') diff --git a/lib/DecoderWorkerLock.hpp b/lib/DecoderWorkerLock.hpp new file mode 100644 index 00000000..c5b4e0ab --- /dev/null +++ b/lib/DecoderWorkerLock.hpp @@ -0,0 +1,23 @@ +#ifndef WSJTX_DECODER_WORKER_LOCK_HPP +#define WSJTX_DECODER_WORKER_LOCK_HPP + +#include + +class DecoderWorkerLock final +{ +public: + explicit DecoderWorkerLock (char const * path) noexcept; + ~DecoderWorkerLock (); + DecoderWorkerLock (DecoderWorkerLock const&) = delete; + DecoderWorkerLock& operator= (DecoderWorkerLock const&) = delete; + + bool tryLock () noexcept; + bool busy () const noexcept; + std::string errorString () const; + +private: + int descriptor_ {-1}; + int error_ {0}; +}; + +#endif -- cgit v1.2.3