# HG changeset patch # User Sebastien Jodogne # Date 1526986778 -7200 # Node ID ef5b4588497238e03cb38df0d62fb33fa4da8225 # Parent 912a767911b02e271f912f7abefbd5ecabf70138 fix diff -r 912a767911b0 -r ef5b45884972 OrthancServer/LuaScripting.cpp --- 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)) { diff -r 912a767911b0 -r ef5b45884972 OrthancServer/LuaScripting.h --- 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) :