forked from JetBrains/phpstorm-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parallel.php
45 lines (40 loc) · 1.48 KB
/
parallel.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace parallel;
use Closure;
/**
* Shall use the provided file to bootstrap all runtimes created for automatic scheduling via @see run().
*
* @param string $file
*
* @throws Runtime\Error\Bootstrap if previously called for this process.
* @throws Runtime\Error\Bootstrap if called after @see run().
*/
function bootstrap(string $file) : void{}
/**
* @see Runtime::run() for more details
*
* @param Closure $task
* @param array $argv
*
* ### Automatic Scheduling
* ---------------------------------------------------------------------------------------------------------------------
* If a \parallel\Runtime internally created and cached by a previous call to parallel\run() is idle, it will be used
* to execute the task. If no \parallel\Runtime is idle parallel will create and cache a \parallel\Runtime.
*
* Note: \parallel\Runtime objects created by the programmer are not used for automatic scheduling.
*
* @return Future|null
*
* @throws Runtime\Error\Closed if \parallel\Runtime was closed.
* @throws Runtime\Error\IllegalFunction if task is a closure created from an internal function.
* @throws Runtime\Error\IllegalInstruction if task contains illegal instructions.
* @throws Runtime\Error\IllegalParameter if task accepts or argv contains illegal variables.
* @throws Runtime\Error\IllegalReturn if task returns illegally.
*/
function run(Closure $task, array $argv = null) : ?Future{}
#ifdef ZEND_DEBUG
/**
* @return int
*/
function count() : int{}
#endif