public IOLoop(ISocketImpl impl=null)
{
_impl = impl ?? new _Select();
//if hasattr(self._impl, 'fileno'):
// set_close_exec(self._impl.fileno())
_handlers = new Dictionary<int, Action<int, int>>();
_events = new Dictionary<int, int>();
_callbacks = new List<Action>();
_callback_lock = this;
_timeouts = new SortedList<DateTime,_Timeout>();
_running = false;
_stopped = false;
_thread_ident = 0;
_blocking_signal_threshold = null;
_instance_lock = this;
// Create a pipe that we send bogus data to when we want to wake
// the I/O loop when it is idle
/*self._waker = Waker()
self.add_handler(self._waker.fileno(),
lambda fd, events: self._waker.consume(),
self.READ)*/
}