internal AbstractProducer(IThreadWrapper worker, IStartupBarrier startupBarrier = null) { _worker = worker; _worker.Setup(Loop, cancellationToken => { Startup(AddWork, cancellationToken); startupBarrier?.Wait(cancellationToken); }); }
public void DoFinally(WorkItemResult result, CancellationToken cancellationToken) { _workBatch.DoFinally(result, cancellationToken); _barrier?.Wait(cancellationToken); }