class Concurrent

Properties

protected Channel $channel

Methods

__construct(int $limit)

No description

mixed
__call(string $name, array $arguments)

Proxy isFull() and isEmpty() to the channel.

int
getLimit()

Get the concurrency limit.

int
length()

Get the current number of running coroutines.

int
getLength()

Get the current number of running coroutines.

int
getRunningCoroutineCount()

Get the current number of running coroutines.

getChannel()

Get the underlying channel.

void
create(callable $callable)

Create a new coroutine with concurrency limiting.

void
fork(callable $callable, array $keys = [])

Create a new coroutine with concurrency limiting and parent context propagation.

bool
isFull()

No description

bool
isEmpty()

No description

Details

at line 19
__construct(int $limit)

No description

Parameters

int $limit

at line 31
mixed __call(string $name, array $arguments)

Proxy isFull() and isEmpty() to the channel.

Parameters

string $name
array $arguments

Return Value

mixed

Exceptions

InvalidArgumentException

at line 43
int getLimit()

Get the concurrency limit.

Return Value

int

at line 51
int length()

Get the current number of running coroutines.

Return Value

int

at line 59
int getLength()

Get the current number of running coroutines.

Return Value

int

at line 67
int getRunningCoroutineCount()

Get the current number of running coroutines.

Return Value

int

at line 75
Channel getChannel()

Get the underlying channel.

Return Value

Channel

at line 83
void create(callable $callable)

Create a new coroutine with concurrency limiting.

Parameters

callable $callable

Return Value

void

at line 107
void fork(callable $callable, array $keys = [])

Create a new coroutine with concurrency limiting and parent context propagation.

Parameters

callable $callable
array $keys

Context keys to copy (empty = all keys)

Return Value

void

at line 15
bool isFull()

No description

Return Value

bool

at line 15
bool isEmpty()

No description

Return Value

bool