mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 03:20:11 +01:00
add PollSet::has/empty(); ParallelAcceptor: always use same reactor for a socket, if registered
This commit is contained in:
committed by
Alex Fabijanic
parent
f6e6bec32d
commit
df46368413
@@ -116,6 +116,9 @@ void SocketReactor::run()
|
||||
bool SocketReactor::hasSocketHandlers()
|
||||
{
|
||||
ScopedLock lock(_mutex);
|
||||
|
||||
if (_pollSet.empty()) return false;
|
||||
|
||||
for (EventHandlerMap::iterator it = _handlers.begin(); it != _handlers.end(); ++it)
|
||||
{
|
||||
if (it->second->accepts(_pReadableNotification) ||
|
||||
@@ -219,6 +222,12 @@ void SocketReactor::removeEventHandler(const Socket& socket, const Poco::Abstrac
|
||||
}
|
||||
|
||||
|
||||
bool SocketReactor::has(const Socket& socket) const
|
||||
{
|
||||
return _pollSet.has(socket);
|
||||
}
|
||||
|
||||
|
||||
void SocketReactor::onTimeout()
|
||||
{
|
||||
dispatch(_pTimeoutNotification);
|
||||
|
||||
Reference in New Issue
Block a user