Ejemplo n.º 1
0
 /// <summary>
 /// Ctor with heap instance.
 /// </summary>
 /// <param name="heap">Instance of the heap secure with lock</param>
 /// <exception cref="DdnDfException">When provided instance is null.</exception>
 public LockBasedConcurrentHeap(IResizableHeap <T> heap) :
     this(heap.ThrowIfNull($"{nameof(heap)} instance not provided."),
          new object())
 {
 }
Ejemplo n.º 2
0
 // for testing purpose
 internal LockBasedConcurrentHeap(IResizableHeap <T> heap,
                                  object syncRoot)
 {
     _heap     = heap;
     _syncRoot = syncRoot;
 }