summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-01-13 22:41:08 +0000
committerStephen D. Huston <shuston@apache.org>2009-01-13 22:41:08 +0000
commit82e11b60852a7baa3272f4c31f848312ea274edb (patch)
tree8d2d8ff1e4cb70549d5c703926740432b4e28354 /qpid/cpp/src
parent4f97d4d7e1bd3fb047ba42bdfb001c2a9351f35a (diff)
downloadqpid-python-82e11b60852a7baa3272f4c31f848312ea274edb.tar.gz
Move dispatcher code from iocpDispatcher.cpp (no longer needed) to IocpPoller.cpp (run); mirrors migration introduced on Linux side
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@734265 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/Makefile.am1
-rw-r--r--qpid/cpp/src/common.vcproj12
-rwxr-xr-xqpid/cpp/src/qpid/sys/windows/IocpDispatcher.cpp54
-rwxr-xr-xqpid/cpp/src/qpid/sys/windows/IocpPoller.cpp18
4 files changed, 24 insertions, 61 deletions
diff --git a/qpid/cpp/src/Makefile.am b/qpid/cpp/src/Makefile.am
index f9ddc232ac..27592f09ed 100644
--- a/qpid/cpp/src/Makefile.am
+++ b/qpid/cpp/src/Makefile.am
@@ -38,7 +38,6 @@ windows_dist = \
qpid/sys/windows/Condition.h \
qpid/sys/windows/FileSysDir.cpp \
qpid/sys/windows/IntegerTypes.h \
- qpid/sys/windows/IocpDispatcher.cpp \
qpid/sys/windows/IocpPoller.cpp \
qpid/sys/windows/IOHandle.cpp \
qpid/sys/windows/IoHandlePrivate.h \
diff --git a/qpid/cpp/src/common.vcproj b/qpid/cpp/src/common.vcproj
index b88995987c..8786ed6b03 100644
--- a/qpid/cpp/src/common.vcproj
+++ b/qpid/cpp/src/common.vcproj
@@ -930,6 +930,9 @@
RelativePath="qpid\sys\AsynchIOHandler.cpp">
</File>
<File
+ RelativePath="qpid\sys\Dispatcher.cpp">
+ </File>
+ <File
RelativePath="qpid\sys\PollableCondition.h">
</File>
<File
@@ -942,13 +945,13 @@
RelativePath="qpid\sys\Shlib.cpp">
</File>
<File
- RelativePath="qpid\sys\windows\AsynchIO.cpp">
+ RelativePath="qpid\sys\Timer.cpp">
</File>
<File
- RelativePath="qpid\sys\windows\FileSysDir.cpp">
+ RelativePath="qpid\sys\windows\AsynchIO.cpp">
</File>
<File
- RelativePath="qpid\sys\windows\IocpDispatcher.cpp">
+ RelativePath="qpid\sys\windows\FileSysDir.cpp">
</File>
<File
RelativePath="qpid\sys\windows\IocpPoller.cpp">
@@ -1834,6 +1837,9 @@
RelativePath="qpid\sys\TimeoutHandler.h">
</File>
<File
+ RelativePath="qpid\sys\Timer.h">
+ </File>
+ <File
RelativePath="qpid\sys\uuid.h">
</File>
<File
diff --git a/qpid/cpp/src/qpid/sys/windows/IocpDispatcher.cpp b/qpid/cpp/src/qpid/sys/windows/IocpDispatcher.cpp
deleted file mode 100755
index 1a0f6ce927..0000000000
--- a/qpid/cpp/src/qpid/sys/windows/IocpDispatcher.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-#include "qpid/sys/Dispatcher.h"
-
-#include <assert.h>
-
-namespace qpid {
-namespace sys {
-
-Dispatcher::Dispatcher(Poller::shared_ptr poller0) :
- poller(poller0) {
-}
-
-Dispatcher::~Dispatcher() {
-}
-
-void Dispatcher::run() {
- do {
- Poller::Event event = poller->wait();
-
- // Handle shutdown
- switch (event.type) {
- case Poller::SHUTDOWN:
- return;
- break;
- case Poller::INVALID: // On any type of success or fail completion
- break;
- default:
- // This should be impossible
- assert(false);
- }
- } while (true);
-}
-
-}}
diff --git a/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp b/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp
index 1e24adfb46..3760c26c00 100755
--- a/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp
+++ b/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp
@@ -105,9 +105,21 @@ bool Poller::interrupt(PollerHandle&) {
}
void Poller::run() {
- Poller::shared_ptr p(this);
- qpid::sys::Dispatcher d(p);
- d.run();
+ do {
+ Poller::Event event = this->wait();
+
+ // Handle shutdown
+ switch (event.type) {
+ case Poller::SHUTDOWN:
+ return;
+ break;
+ case Poller::INVALID: // On any type of success or fail completion
+ break;
+ default:
+ // This should be impossible
+ assert(false);
+ }
+ } while (true);
}
void Poller::addFd(PollerHandle& handle, Direction dir) {