Class ConcurrentPool<T>
- Namespace
- Hegel
- Assembly
- Hegel.dll
A Pool<T> shared by the workers of a concurrent stateful test.
public sealed class ConcurrentPool<T>
Type Parameters
TThe type of value pooled.
- Inheritance
-
ConcurrentPool<T>
- Inherited Members
Constructors
ConcurrentPool(TestCase)
A pool for the test case tc.
public ConcurrentPool(TestCase tc)
Parameters
tcTestCase
Properties
Count
How many values the pool holds.
public int Count { get; }
Property Value
IsEmpty
Whether the pool holds no values.
public bool IsEmpty { get; }
Property Value
Methods
Add(TestCase, T)
Add value through the worker's test case tc.
public void Add(TestCase tc, T value)
Parameters
tcTestCasevalueT
Consuming()
A generator drawing a value and removing it from the pool.
public PrintableGenerator<T> Consuming()
Returns
Reusable()
A generator drawing a value that stays in the pool.
public PrintableGenerator<T> Reusable()