private void queueEvent(WatchedEvent @event) { if (@event.get_Type() == Watcher.Event.EventType.None && sessionState.Value == (int)@event.getState()) { return; } sessionState.Value = (int)@event.getState(); // materialize the watchers based on the event WatcherSetEventPair pair = new WatcherSetEventPair( watcher.materialize(@event.getState(), @event.get_Type(), @event.getPath()), @event); // queue the pair (watch set & event) for later processing waitingEvents.Enqueue(pair); waitingEventsSignal.TrySet(); }
internal override void wakeupCnxn() { somethingIsPending.TrySet(); }