PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.IPoolItem< T > Interface Template Reference

Represents a pooled item of type T. More...

Inheritance diagram for PeanutButter.Utils.IPoolItem< T >:
PeanutButter.Utils.PoolItem< T >

Public Member Functions

bool TryLock (int maxWait)
 Used internally to try to lock off a pool item so it can be handed out to another consumer.

Properties

Instance [get]
 The instance of the pooled item.
bool IsAvailable [get]
 Flag: is this instance available for usage.

Detailed Description

Represents a pooled item of type T.

Template Parameters
T

Member Function Documentation

◆ TryLock()

bool PeanutButter.Utils.IPoolItem< T >.TryLock ( int maxWait)

Used internally to try to lock off a pool item so it can be handed out to another consumer.

  • you should never need to call this, and it should always return false from within consumer code
Parameters
maxWait

Implemented in PeanutButter.Utils.PoolItem< T >.

Property Documentation

◆ Instance

T PeanutButter.Utils.IPoolItem< T >.Instance
get

The instance of the pooled item.

Implemented in PeanutButter.Utils.PoolItem< T >.

◆ IsAvailable

bool PeanutButter.Utils.IPoolItem< T >.IsAvailable
get

Flag: is this instance available for usage.

Implemented in PeanutButter.Utils.PoolItem< T >.


The documentation for this interface was generated from the following file:
  • source/Utils/PeanutButter.Utils/Pool.cs