A thread safe, non-blocking, object pool.
More...
|
| | Pool () |
| | Initializes a new instance of the Pool<T> class. More...
|
| |
| T | Get (Thread thread) |
| | Gets an instance from the pool. More...
|
| |
| void | Return (Thread thread, T instance) |
| | Returns an instance to the pool, so it is available for re-use. It is advised that the item is reset to a default state before being returned. More...
|
| |
| void | Clean () |
| |
A thread safe, non-blocking, object pool.
- Template Parameters
-
| T | The type of item to store. Must be a class with a parameterless constructor. |
Definition at line 16 of file Pool.cs.
Initializes a new instance of the Pool<T> class.
Definition at line 25 of file Pool.cs.
Gets an instance from the pool.
- Returns
- An instance of T .
Definition at line 38 of file Pool.cs.
Returns an instance to the pool, so it is available for re-use. It is advised that the item is reset to a default state before being returned.
- Parameters
-
| instance | The instance to return to the pool. |
Definition at line 62 of file Pool.cs.
The documentation for this class was generated from the following file:
- Sources/VRage.Library/ParallelTasks/Pool.cs