[ekiga] Engine: Fixed a few mutexes that could be left in Waiting state.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Engine: Fixed a few mutexes that could be left in Waiting state.
- Date: Sun, 3 Mar 2013 11:53:03 +0000 (UTC)
commit a5151ef7280f0c7ab1b0b62978e6f5c121f554c5
Author: Damien Sandras <dsandras beip be>
Date: Sun Mar 3 12:51:54 2013 +0100
Engine: Fixed a few mutexes that could be left in Waiting state.
This is essentially cosmetic. However, it could lead to an Assertion
when ptlib is compiled in DEBUG mode. This is ended better to make sure
a mutex is in "neutral" state when being destroyed and not waiting for
the corresponding Signal operation.
.../dx-videooutput/videooutput-manager-dx.cpp | 3 ++-
lib/engine/videoinput/videoinput-core.cpp | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/lib/engine/components/dx-videooutput/videooutput-manager-dx.cpp
b/lib/engine/components/dx-videooutput/videooutput-manager-dx.cpp
index 4bce59f..ff875ca 100644
--- a/lib/engine/components/dx-videooutput/videooutput-manager-dx.cpp
+++ b/lib/engine/components/dx-videooutput/videooutput-manager-dx.cpp
@@ -58,7 +58,8 @@ void GMVideoOutputManager_dx::quit ()
{
end_thread = true;
run_thread.Signal();
- thread_ended.Wait();
+
+ PWaitAndSignal m(thread_ended);
}
bool
diff --git a/lib/engine/videoinput/videoinput-core.cpp b/lib/engine/videoinput/videoinput-core.cpp
index 8c63003..4905c96 100644
--- a/lib/engine/videoinput/videoinput-core.cpp
+++ b/lib/engine/videoinput/videoinput-core.cpp
@@ -68,7 +68,7 @@ void VideoInputCore::VideoPreviewManager::quit ()
stop();
end_thread = true;
run_thread.Signal();
- thread_ended.Wait();
+ PWaitAndSignal m(thread_ended);
}
void VideoInputCore::VideoPreviewManager::start (unsigned _width, unsigned _height)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]