X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/1789eecd7c4b239e5a521231387b9d30731cdf64..4878eece18057b563452421a54979f7f11bad8fb:/messages.cpp?ds=sidebyside diff --git a/messages.cpp b/messages.cpp index 39c4f0f..547a29f 100644 --- a/messages.cpp +++ b/messages.cpp @@ -78,9 +78,6 @@ bool message_queue::pop(message*& msg, msg_host_t& from, double timeout) else cond.wait(mutex); } - TRY_CLEANUP { - mutex.release(); - } CATCH (e) { if (e.category != timeout_error) RETHROW; @@ -89,9 +86,8 @@ bool message_queue::pop(message*& msg, msg_host_t& from, double timeout) } bool pop_was_successful = queue.try_pop(task); xbt_assert(pop_was_successful); - } else { - mutex.release(); } + mutex.release(); } msg = static_cast(MSG_task_get_data(task)); from = MSG_task_get_source(task);