示例#1
0
        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;
        }
示例#2
0
 public EPoll()
 {
     m_fd = epoll_create(DefaultSize);
     UnixMarshal.ThrowExceptionForLastErrorIf(m_fd);
     m_buffer = new EPollBuffer();
 }