summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/request_queue.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-09-23 19:23:39 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-09-23 19:23:39 +0000
commit037511a364629d200c22cd08e0fa4922f2429bfc (patch)
tree510680699b0e8eb046b771b9de350b20fd0e7fa8 /protocols/SkypeWeb/src/request_queue.cpp
parenta8dfca9c4a079c6d9706fa819b8993a2df5d7270 (diff)
SkypeWeb: code optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@15429 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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;