Ejemplo n.º 1
0
            public QueryContent(int id, Consumer<MyContent> callback)
            {
                Id = id;

                var queue = new ThreadPoolFiber();
                Channel<MyContent> channel = new ConsumerChannel<MyContent>(new SynchronousFiber(), callback);

                if (SynchronizationContext.Current != null)
                {
                    channel = new SynchronizedChannel<MyContent>(queue, channel, SynchronizationContext.Current);
                }
                ResponseChannel = channel;
            }
Ejemplo n.º 2
0
 public DirectoryMonitor(string directory)
 {
     _baseDirectory = directory;
     _coordinatorChannel = AddressRegistry.GetOutboundCoordinatorChannel();
     _fiber = new ThreadPoolFiber();
 }