コード例 #1
0
 /// <summary>
 /// Create a new ValueDisruptor.
 /// </summary>
 /// <param name="eventFactory">the factory to create events in the ring buffer</param>
 /// <param name="ringBufferSize">the size of the ring buffer, must be power of 2</param>
 /// <param name="taskScheduler">a <see cref="TaskScheduler"/> to create threads for processors</param>
 /// <param name="producerType">the claim strategy to use for the ring buffer</param>
 /// <param name="waitStrategy">the wait strategy to use for the ring buffer</param>
 public ValueDisruptor(Func <T> eventFactory, int ringBufferSize, TaskScheduler taskScheduler, ProducerType producerType, IWaitStrategy waitStrategy)
     : this(ValueRingBuffer <T> .Create(producerType, eventFactory, ringBufferSize, waitStrategy), new BasicExecutor(taskScheduler))
 {
 }