event/SocketMonitor: add method Abandon()
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user