/// <summary>Wrap a ProgressMonitor to be thread safe.</summary>
		/// <remarks>Wrap a ProgressMonitor to be thread safe.</remarks>
		/// <param name="pm">the underlying monitor to receive events.</param>
		public ThreadSafeProgressMonitor(ProgressMonitor pm)
		{
			this.pm = pm;
			this.Lock = new ReentrantLock();
			this.mainThread = Sharpen.Thread.CurrentThread();
			this.workers = new AtomicInteger(0);
			this.pendingUpdates = new AtomicInteger(0);
			this.process = Sharpen.Extensions.CreateSemaphore(0);
		}
예제 #2
0
		internal ThreadSafeDeltaCache(PackConfig pc) : base(pc)
		{
			Lock = new ReentrantLock();
		}