ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Data Structures | |
class | FunctionsTest |
class | Loop |
A simple eventloop implementation. More... | |
class | LoopTest |
Functions | |
setTimeout (callable $cb, $timeout) | |
Executes a function after x seconds. More... | |
setInterval (callable $cb, $timeout) | |
Executes a function every x seconds. More... | |
clearInterval ($intervalId) | |
Stops a running internval. More... | |
nextTick (callable $cb) | |
Runs a function immediately at the next iteration of the loop. More... | |
addReadStream ($stream, callable $cb) | |
Adds a read stream. More... | |
addWriteStream ($stream, callable $cb) | |
Adds a write stream. More... | |
removeReadStream ($stream) | |
Stop watching a stream for reads. More... | |
removeWriteStream ($stream) | |
Stop watching a stream for writes. More... | |
run () | |
Runs the loop. More... | |
tick ($block=false) | |
Executes all pending events. More... | |
stop () | |
Stops a running eventloop. More... | |
instance (Loop $newLoop=null) | |
Retrieves or sets the global Loop object. More... | |
Sabre\Event\Loop\addReadStream | ( | $stream, | |
callable | $cb | ||
) |
Adds a read stream.
The callback will be called as soon as there is something to read from the stream.
You MUST call removeReadStream after you are done with the stream, to prevent the eventloop from never stopping.
resource | $stream | |
callable | $cb |
Definition at line 72 of file functions.php.
References GuzzleHttp\Psr7\$stream, and Sabre\Event\Loop\instance().
Referenced by Sabre\Event\Loop\FunctionsTest\testAddReadStream().
Sabre\Event\Loop\addWriteStream | ( | $stream, | |
callable | $cb | ||
) |
Adds a write stream.
The callback will be called as soon as the system reports it's ready to receive writes on the stream.
You MUST call removeWriteStream after you are done with the stream, to prevent the eventloop from never stopping.
resource | $stream | |
callable | $cb |
Definition at line 91 of file functions.php.
References GuzzleHttp\Psr7\$stream, and Sabre\Event\Loop\instance().
Referenced by Sabre\Event\Loop\FunctionsTest\testAddWriteStream().
Sabre\Event\Loop\clearInterval | ( | $intervalId | ) |
Stops a running internval.
array | $intervalId |
Definition at line 40 of file functions.php.
References Sabre\Event\Loop\instance().
Referenced by Sabre\Event\Loop\FunctionsTest\testSetInterval().
Sabre\Event\Loop\instance | ( | Loop | $newLoop = null | ) |
Retrieves or sets the global Loop object.
Loop | $newLoop |
Definition at line 173 of file functions.php.
Referenced by ilSimpleSAMLphplIdpDiscovery\__construct(), ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\TypeInformation\__construct(), SimpleSAML_XHTML_IdPDisco\__construct(), Sabre\Event\Loop\addReadStream(), Sabre\Event\Loop\addWriteStream(), Sabre\Event\Loop\clearInterval(), ilGSProviderStorage\getInstance(), ilInitialisation\initBackgroundTasks(), ILIAS\BackgroundTasks\Types\VoidType\instance(), ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\TypeInformation\isChild(), ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\TypeInformation\isParent(), ILIAS\GlobalScreen\Scope\MainMenu\Collector\Information\TypeInformation\isTop(), sspmod_discopower_PowerIdPDisco\log(), SimpleSAML_XHTML_IdPDisco\log(), Sabre\Event\Loop\nextTick(), UtfNormal\quickIsNFCVerify(), Sabre\Event\Loop\removeReadStream(), Sabre\Event\Loop\removeWriteStream(), Sabre\Event\Loop\run(), ilChatroomServerSettings\setInstance(), Sabre\Event\Loop\setInterval(), Sabre\Event\Loop\setTimeout(), Sabre\Event\Loop\FunctionsTest\setUp(), Sabre\Event\Loop\stop(), Sabre\Event\Loop\FunctionsTest\tearDown(), and Sabre\Event\Loop\tick().
Sabre\Event\Loop\nextTick | ( | callable | $cb | ) |
Runs a function immediately at the next iteration of the loop.
callable | $cb |
Definition at line 52 of file functions.php.
References Sabre\Event\Loop\instance().
Referenced by Sabre\Event\Promise\invokeCallback(), Sabre\Event\Loop\FunctionsTest\testNextTick(), Sabre\Event\Loop\FunctionsTest\testStop(), Sabre\Event\Loop\FunctionsTest\testTick(), Sabre\Event\Promise\PromiseTest\testWaitRejectedException(), Sabre\Event\PromiseTest\testWaitRejectedException(), Sabre\Event\Promise\PromiseTest\testWaitRejectedNonScalar(), Sabre\Event\PromiseTest\testWaitRejectedNonScalar(), Sabre\Event\Promise\PromiseTest\testWaitRejectedScalar(), Sabre\Event\PromiseTest\testWaitRejectedScalar(), Sabre\Event\Promise\PromiseTest\testWaitResolve(), and Sabre\Event\PromiseTest\testWaitResolve().
Sabre\Event\Loop\removeReadStream | ( | $stream | ) |
Stop watching a stream for reads.
resource | $stream |
Definition at line 103 of file functions.php.
References GuzzleHttp\Psr7\$stream, and Sabre\Event\Loop\instance().
Referenced by Sabre\Event\Loop\FunctionsTest\testAddReadStream().
Sabre\Event\Loop\removeWriteStream | ( | $stream | ) |
Stop watching a stream for writes.
resource | $stream |
Definition at line 115 of file functions.php.
References GuzzleHttp\Psr7\$stream, and Sabre\Event\Loop\instance().
Referenced by Sabre\Event\Loop\FunctionsTest\testAddWriteStream().
Sabre\Event\Loop\run | ( | ) |
Runs the loop.
This function will run continiously, until there's no more events to handle.
Definition at line 130 of file functions.php.
References Sabre\Event\Loop\instance().
Referenced by ilLOTestQuestionAdapter\initTestRun(), ilLOTestQuestionAdapter\initUserResult(), ilLOTestQuestionAdapter\isInRun(), printHelp(), Whoops\Handler\Handler\setRun(), ilLOTestQuestionAdapter\storeTestRun(), Sabre\Event\Loop\FunctionsTest\testAddReadStream(), Sabre\Event\Loop\FunctionsTest\testAddWriteStream(), Sabre\Event\Promise\FunctionsTest\testAll(), Sabre\Event\PromiseTest\testAll(), Sabre\Event\Promise\PromiseTest\testAll(), Sabre\Event\Promise\FunctionsTest\testAllReject(), Sabre\Event\PromiseTest\testAllReject(), Sabre\Event\Promise\PromiseTest\testAllReject(), Sabre\Event\Promise\FunctionsTest\testAllRejectThenResolve(), Sabre\Event\PromiseTest\testAllRejectThenResolve(), Sabre\Event\Promise\PromiseTest\testAllRejectThenResolve(), Sabre\Event\PromiseTest\testChain(), Sabre\Event\Promise\PromiseTest\testChain(), Sabre\Event\PromiseTest\testChainPromise(), Sabre\Event\Promise\PromiseTest\testChainPromise(), Sabre\Event\CoroutineTest\testCoroutineException(), Sabre\Event\CoroutineTest\testDeepException(), Sabre\Event\PromiseTest\testExecutorFail(), Sabre\Event\Promise\PromiseTest\testExecutorFail(), Sabre\Event\PromiseTest\testExecutorSuccess(), Sabre\Event\Promise\PromiseTest\testExecutorSuccess(), Sabre\Event\PromiseTest\testFail(), Sabre\Event\Promise\PromiseTest\testFail(), Sabre\Event\PromiseTest\testFromFailureHandler(), Sabre\Event\Promise\PromiseTest\testFromFailureHandler(), Sabre\Event\CoroutineTest\testFulfilledPromise(), Sabre\Event\CoroutineTest\testFulfilledPromiseAsync(), Sabre\Event\Loop\FunctionsTest\testNextTick(), Sabre\Event\PromiseTest\testPendingFail(), Sabre\Event\Promise\PromiseTest\testPendingFail(), Sabre\Event\PromiseTest\testPendingResult(), Sabre\Event\Promise\PromiseTest\testPendingResult(), Sabre\Event\Promise\FunctionsTest\testRace(), Sabre\Event\PromiseTest\testRace(), Sabre\Event\Promise\FunctionsTest\testRaceReject(), Sabre\Event\PromiseTest\testRaceReject(), Sabre\Event\Promise\FunctionsTest\testReject(), Sabre\Event\CoroutineTest\testRejectedPromise(), Sabre\Event\CoroutineTest\testRejectedPromiseAsync(), Sabre\Event\CoroutineTest\testRejectedPromiseException(), Sabre\Event\Promise\FunctionsTest\testResolve(), Sabre\Event\CoroutineTest\testResolveToLastYield(), Sabre\Event\CoroutineTest\testResolveToLastYieldPromise(), Sabre\Event\Loop\FunctionsTest\testSetInterval(), Sabre\Event\Loop\FunctionsTest\testStop(), Sabre\Event\PromiseTest\testSuccess(), Sabre\Event\Promise\PromiseTest\testSuccess(), Sabre\Event\Loop\FunctionsTest\testTimeout(), Sabre\Event\Loop\FunctionsTest\testTimeoutOrder(), ilLOTestQuestionAdapter\updateFixedQuestions(), ilLOTestQuestionAdapter\updateQuestionResult(), ilLOTestQuestionAdapter\updateRandomQuestions(), and ilLOTestQuestionAdapter\updateSeparateTestQuestions().
Sabre\Event\Loop\setInterval | ( | callable | $cb, |
$timeout | |||
) |
Executes a function every x seconds.
The value this function returns can be used to stop the interval with clearInterval.
callable | $cb | |
float | $timeout |
Definition at line 28 of file functions.php.
References Sabre\Event\Loop\instance().
Referenced by Sabre\Event\Loop\FunctionsTest\testSetInterval().
Sabre\Event\Loop\setTimeout | ( | callable | $cb, |
$timeout | |||
) |
Executes a function after x seconds.
callable | $cb | |
float | $timeout | timeout in seconds |
Definition at line 12 of file functions.php.
References Sabre\Event\Loop\instance().
Referenced by Sabre\Event\Loop\FunctionsTest\testStop(), Sabre\Event\Loop\FunctionsTest\testTick(), Sabre\Event\Loop\FunctionsTest\testTimeout(), and Sabre\Event\Loop\FunctionsTest\testTimeoutOrder().
Sabre\Event\Loop\stop | ( | ) |
Stops a running eventloop.
Definition at line 162 of file functions.php.
References Sabre\Event\Loop\instance().
Referenced by Sabre\Event\Loop\FunctionsTest\testStop().
Sabre\Event\Loop\tick | ( | $block = false | ) |
Executes all pending events.
If $block is turned true, this function will block until any event is triggered.
If there are now timeouts, nextTick callbacks or events in the loop at all, this function will exit immediately.
This function will return true if there are any events left in the loop after the tick.
bool | $block |
Definition at line 151 of file functions.php.
References Sabre\Event\Loop\instance().
Referenced by Sabre\Event\Loop\FunctionsTest\testTick(), and Sabre\Event\Promise\wait().