<TTask is Task, TResult>
abstract | |
---|---|
implements |
Scheduler<TTask, TResult> |
Methods | ||
---|---|---|
public
|
__construct(int $workerCount)
|
# |
public
static
|
writeMessage(resource $stream, mixed $message): void
|
# |
public
static
|
readMessage(resource $stream): mixed
|
# |
public
static
|
workerLoop<T2 is Task, R2>(TaskHandler<T2, R2> $handler, resource $inputStream, resource $outputStream): void
|
# |
public
|
schedule(TTask $task): void
|
# |
public
|
process(): iterable<TTask, TResult>
|
# |
abstract
protected
|
start(): void
|
# |
abstract
protected
|
stop(): void
|
# |
Constants | |||
---|---|---|---|
protected
|
WORKER_CAPACITY_LIMIT = 8
|
# |
Properties | |||
---|---|---|---|
protected
|
SplQueue<TTask>
|
$tasks
|
# |
protected
|
int
|
$pendingTaskCount = 0
|
# |
protected
|
resource[]
|
$workerReadableStreams = []
|
# |
protected
|
resource[]
|
$workerWritableStreams = []
|
# |
protected
|
int
|
$workerCount
|
# |