mirror of
https://github.com/wagesj45/CapyKit.git
synced 2024-10-18 07:01:50 -05:00
4 KiB
4 KiB
Pool<T> Class
A managed pool of resources. This class provides a thread-safe way to manage a collection of objects of type T.
Definition
Namespace: CapyKit
Assembly: CapyKit (in CapyKit.dll) Version: 1.0.0+735d7c4c91a8ae04c2d8cae4ce85ddf4909e5b7d
C#
public class Pool<T>
F#
type Pool<'T> = class end
Inheritance | Object → Pool(T) |
Type Parameters
- The type of objects to be managed by the pool.
Constructors
Pool(T)(IEnumerable(T)) | Initializes a new instance of the Pool(T) class with the specified collection of items. |
Pool(T)(Int32) | Initializes a new instance of the Pool(T) class with the specified pool size. |
Pool(T)(Int32, Func(T)) | Initializes a new instance of the Pool(T) class with the specified pool size and constructor selector. |
Methods
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
GetAvailableItem | Gets the first available item from the pool and sets its lock. |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
ReleaseItem | Releases the lock on the specified item and returns it to the pool. |
ToString | Returns a string that represents the current object. (Inherited from Object) |