コード例 #1
0
ファイル: ClientCnxn.cs プロジェクト: withlin/zookeeper
        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();
        }
コード例 #2
0
 internal override void wakeupCnxn()
 {
     somethingIsPending.TrySet();
 }