コード例 #1
0
 private void Enqueue(PersistentSubscriptionResolvedEvent resolvedEvent)
 {
     _queue.Enqueue(resolvedEvent);
     if (Interlocked.CompareExchange(ref _isProcessing, 1, 0) == 0)
     {
         ThreadPool.QueueUserWorkItem(_ => ProcessQueue());
     }
 }
コード例 #2
0
 private Task OnEventAppeared(EventStoreSubscription subscription,
                              PersistentSubscriptionResolvedEvent resolvedEvent)
 {
     Enqueue(resolvedEvent);
     return(TaskEx.CompletedTask);
 }