Mercurial > hg > orthanc
changeset 2618:ef5b45884972 jobs
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 May 2018 12:59:38 +0200 |
parents | 912a767911b0 |
children | 4ecb79c6e81c |
files | OrthancServer/LuaScripting.cpp OrthancServer/LuaScripting.h |
diffstat | 2 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/LuaScripting.cpp Tue May 22 12:45:34 2018 +0200 +++ b/OrthancServer/LuaScripting.cpp Tue May 22 12:59:38 2018 +0200 @@ -536,7 +536,7 @@ if (event.get() == NULL) { // The event queue is empty, check whether we should stop - boost::mutex::scoped_lock lock(that->mutex_); + boost::recursive_mutex::scoped_lock lock(that->mutex_); if (!that->continue_) { @@ -560,7 +560,7 @@ void LuaScripting::Start() { - boost::mutex::scoped_lock lock(mutex_); + boost::recursive_mutex::scoped_lock lock(mutex_); if (!continue_ || eventThread_.joinable() /* already started */) @@ -578,7 +578,7 @@ void LuaScripting::Stop() { { - boost::mutex::scoped_lock lock(mutex_); + boost::recursive_mutex::scoped_lock lock(mutex_); if (!continue_) { @@ -633,7 +633,7 @@ { static const char* NAME = "ReceivedInstanceFilter"; - boost::mutex::scoped_lock lock(mutex_); + boost::recursive_mutex::scoped_lock lock(mutex_); if (lua_.IsExistingFunction(NAME)) {
--- a/OrthancServer/LuaScripting.h Tue May 22 12:45:34 2018 +0200 +++ b/OrthancServer/LuaScripting.h Tue May 22 12:59:38 2018 +0200 @@ -70,13 +70,13 @@ void SubmitJob(); - boost::mutex mutex_; - LuaContext lua_; - ServerContext& context_; - LuaJobManager jobManager_; - bool continue_; - boost::thread eventThread_; - SharedMessageQueue pendingEvents_; + boost::recursive_mutex mutex_; + LuaContext lua_; + ServerContext& context_; + LuaJobManager jobManager_; + bool continue_; + boost::thread eventThread_; + SharedMessageQueue pendingEvents_; static void EventThread(LuaScripting* that); @@ -84,8 +84,8 @@ class Lock : public boost::noncopyable { private: - LuaScripting& that_; - boost::mutex::scoped_lock lock_; + LuaScripting& that_; + boost::recursive_mutex::scoped_lock lock_; public: explicit Lock(LuaScripting& that) :