Merge pull request #65 from vibe-d/fix_eventfd_leak
Fix leaked eventfd in PosixEventDriverCore.
This commit is contained in:
commit
6262c48db3
|
@ -92,6 +92,7 @@ final class PosixEventDriver(Loop : PosixEventLoop) : EventDriver {
|
||||||
if (!m_loop) return;
|
if (!m_loop) return;
|
||||||
m_files.dispose();
|
m_files.dispose();
|
||||||
m_dns.dispose();
|
m_dns.dispose();
|
||||||
|
m_core.dispose();
|
||||||
m_loop.dispose();
|
m_loop.dispose();
|
||||||
m_loop = null;
|
m_loop = null;
|
||||||
}
|
}
|
||||||
|
@ -120,6 +121,12 @@ final class PosixEventDriverCore(Loop : PosixEventLoop, Timers : EventDriverTime
|
||||||
m_wakeupEvent = events.createInternal();
|
m_wakeupEvent = events.createInternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected final void dispose()
|
||||||
|
{
|
||||||
|
m_events.releaseRef(m_wakeupEvent);
|
||||||
|
m_wakeupEvent = EventID.invalid;
|
||||||
|
}
|
||||||
|
|
||||||
@property size_t waiterCount() const { return m_loop.m_waiterCount + m_timers.pendingCount; }
|
@property size_t waiterCount() const { return m_loop.m_waiterCount + m_timers.pendingCount; }
|
||||||
|
|
||||||
final override ExitReason processEvents(Duration timeout)
|
final override ExitReason processEvents(Duration timeout)
|
||||||
|
|
Loading…
Reference in a new issue