private void Dispose(bool disposing) { if(m_disposed) return; if(disposing) { m_buffer.Dispose(); m_buffer = null; GC.SuppressFinalize(this); } int r; do { r = Syscall.close(m_fd); } while(UnixMarshal.ShouldRetrySyscall(r)); UnixMarshal.ThrowExceptionForLastErrorIf(r); m_fd = -1; m_disposed = true; }
public EPoll() { m_fd = epoll_create(DefaultSize); UnixMarshal.ThrowExceptionForLastErrorIf(m_fd); m_buffer = new EPollBuffer(); }