summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/request_queue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/request_queue.cpp')
-rw-r--r--protocols/SkypeWeb/src/request_queue.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/request_queue.cpp b/protocols/SkypeWeb/src/request_queue.cpp
index 1e8113cfdb..5d6cb2893a 100644
--- a/protocols/SkypeWeb/src/request_queue.cpp
+++ b/protocols/SkypeWeb/src/request_queue.cpp
@@ -22,13 +22,11 @@ hConnection(hConnection), requests(1)
{
isTerminated = true;
hRequestQueueThread = NULL;
- hRequestQueueEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
}
RequestQueue::~RequestQueue()
{
requests.destroy();
- CloseHandle(hRequestQueueEvent);
}
void RequestQueue::Start()
@@ -47,7 +45,7 @@ void RequestQueue::Stop()
return;
isTerminated = true;
- SetEvent(hRequestQueueEvent);
+ hRequestQueueEvent.Set();
}
void RequestQueue::Push(HttpRequest *request, HttpResponseCallback response, void *arg)
@@ -61,7 +59,7 @@ void RequestQueue::Push(HttpRequest *request, HttpResponseCallback response, voi
requests.insert(item);
}
- SetEvent(hRequestQueueEvent);
+ hRequestQueueEvent.Set();
}
void RequestQueue::Send(HttpRequest *request, HttpResponseCallback response, void *arg)
@@ -96,7 +94,7 @@ unsigned int RequestQueue::WorkerThread(void *arg)
while (!queue->isTerminated)
{
- WaitForSingleObject(queue->hRequestQueueEvent, INFINITE);
+ queue->hRequestQueueEvent.Wait();
while (true)
{
RequestQueueItem *item = NULL;