event/SocketMonitor: add method Abandon()

This commit is contained in:
Max Kellermann
2013-11-06 18:20:51 +01:00
parent ed436c6f0c
commit 154bdf0bca
4 changed files with 32 additions and 2 deletions

View File

@@ -151,6 +151,19 @@ SocketMonitor::Steal()
return result;
}
void
SocketMonitor::Abandon()
{
assert(IsDefined());
#ifdef USE_EPOLL
fd = -1;
loop.Abandon(*this);
#else
Steal();
#endif
}
void
SocketMonitor::Close()
{