From: Mikko Rasa Date: Tue, 17 Mar 2009 11:56:46 +0000 (+0000) Subject: Allow polling an empty set of objects X-Git-Tag: io-1.1~2 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e0ebde8e33b1915860e6d253f5cefb33a8cd6ee0;p=libs%2Fcore.git Allow polling an empty set of objects Clean up some old debug prints --- diff --git a/source/base.cpp b/source/base.cpp index 174bace..4556b73 100644 --- a/source/base.cpp +++ b/source/base.cpp @@ -9,8 +9,6 @@ Distributed under the LGPL using namespace std; -#include - namespace Msp { namespace IO { @@ -61,7 +59,6 @@ Base::Base(): void Base::set_events(PollEvent e) { - //cout<<"object "< -using namespace std; - namespace Msp { namespace IO { @@ -20,7 +17,6 @@ EventDispatcher::EventDispatcher() void EventDispatcher::add(Base &obj) { - //cout<<"evdisp add "<<&obj<<'\n'; SlotMap::iterator i=objects.find(&obj); if(i==objects.end()) { @@ -35,7 +31,6 @@ void EventDispatcher::add(Base &obj) void EventDispatcher::remove(Base &obj) { - //cout<<"evdisp remove "<<&obj<<'\n'; SlotMap::iterator i=objects.find(&obj); if(i!=objects.end()) { diff --git a/source/poll.cpp b/source/poll.cpp index 3b349b4..659e238 100644 --- a/source/poll.cpp +++ b/source/poll.cpp @@ -100,8 +100,6 @@ void Poller::set_object(Base &obj, PollEvent ev) if(ev) obj.get_event_handle(); - //cout<<"poller set_object "<<&obj<<' '<(&pfd.front()), false, timeout); + DWORD ret=WaitForMultipleObjects(pfd.size(), &pfd.front().fd, false, timeout); if(/*ret>=WAIT_OBJECT_0 &&*/ ret