class Pool extends SplQueue

A singleton pool for reusing Channel instances.

Properties

static protected Pool|null $instance

Methods

static Pool
getInstance()

Get the singleton instance.

get()

Get a channel from the pool, or create a new one if empty.

void
release(Channel $channel)

Release a channel back to the pool.

static void
flushState()

Flush all static state.

Details

at line 22
static Pool getInstance()

Get the singleton instance.

Return Value

Pool

at line 30
Channel get()

Get a channel from the pool, or create a new one if empty.

Return Value

Channel

at line 38
void release(Channel $channel)

Release a channel back to the pool.

Parameters

Channel $channel

Return Value

void

at line 47
static void flushState()

Flush all static state.

Return Value

void