diff options
author | Stephen D. Huston <shuston@apache.org> | 2009-01-13 22:41:08 +0000 |
---|---|---|
committer | Stephen D. Huston <shuston@apache.org> | 2009-01-13 22:41:08 +0000 |
commit | 107bb9c248a09ce56bae63dc8c8ddcbd27d0141a (patch) | |
tree | 949274be2d34cc8b963f9357d93ac07831a0fc7b /cpp/src/qpid/sys/windows | |
parent | 729e8dfff5d888d85c8d8c4201fa956378f4b917 (diff) | |
download | qpid-python-107bb9c248a09ce56bae63dc8c8ddcbd27d0141a.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/qpid@734265 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/windows')
-rwxr-xr-x | cpp/src/qpid/sys/windows/IocpDispatcher.cpp | 54 | ||||
-rwxr-xr-x | cpp/src/qpid/sys/windows/IocpPoller.cpp | 18 |
2 files changed, 15 insertions, 57 deletions
diff --git a/cpp/src/qpid/sys/windows/IocpDispatcher.cpp b/cpp/src/qpid/sys/windows/IocpDispatcher.cpp deleted file mode 100755 index 1a0f6ce927..0000000000 --- a/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/cpp/src/qpid/sys/windows/IocpPoller.cpp b/cpp/src/qpid/sys/windows/IocpPoller.cpp index 1e24adfb46..3760c26c00 100755 --- a/cpp/src/qpid/sys/windows/IocpPoller.cpp +++ b/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) { |