Coroutine
class Coroutine (View source)
Methods
No description
No description
To set runtime configurations of coroutines.
To get runtime configurations of coroutines.
No description
No description
No description
Waits for a list of coroutines to finish.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Get memory usage of a coroutine.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
static mixed
create(callable $func, ...$params)
No description
static mixed
defer(mixed $callback)
No description
static void
set(array $options)
To set runtime configurations of coroutines.
static array|null
getOptions()
To get runtime configurations of coroutines.
static mixed
exists(mixed $cid)
No description
static mixed
yield()
No description
static mixed
cancel(mixed $cid)
No description
static bool
join(array $cid_array, int $timeout = -1)
Waits for a list of coroutines to finish.
This method is similar to class \Swoole\Coroutine\WaitGroup and \Swoole\Coroutine\Barrier. They are different implementations of the same functionality.
static mixed
isCanceled()
No description
static mixed
suspend()
No description
static mixed
resume(mixed $cid)
No description
static mixed
stats()
No description
static mixed
getCid()
No description
static mixed
getuid()
No description
static mixed
getPcid(mixed|null $cid = null)
No description
static mixed
getContext(mixed|null $cid = null)
No description
static mixed
getBackTrace(mixed|null $cid = null, mixed|null $options = null, mixed|null $limit = null)
No description
static mixed
printBackTrace(mixed|null $cid = null, mixed|null $options = null, mixed|null $limit = null)
No description
static mixed
getElapsed(mixed|null $cid = null)
No description
static int|false
getStackUsage(int $cid = null)
Get memory usage of a coroutine.
static mixed
list()
No description
static mixed
listCoroutines()
No description
static mixed
enableScheduler()
No description
static mixed
disableScheduler()
No description
static mixed
gethostbyname(mixed $domain_name, mixed|null $family = null, mixed|null $timeout = null)
No description
static mixed
dnsLookup(mixed $domain_name, mixed|null $timeout = null, mixed|null $type = null)
No description
static mixed
exec(mixed $command, mixed|null $get_error_stream = null)
No description
static mixed
sleep(mixed $seconds)
No description
static mixed
getaddrinfo(mixed $hostname, mixed|null $family = null, mixed|null $socktype = null, mixed|null $protocol = null, mixed|null $service = null, mixed|null $timeout = null)
No description
static mixed
statvfs(mixed $path)
No description
static mixed
readFile(mixed $filename)
No description
static mixed
writeFile(mixed $filename, mixed $data, mixed|null $flags = null)
No description
static mixed
wait(mixed|null $timeout = null)
No description
static mixed
waitPid(mixed $pid, mixed|null $timeout = null)
No description
static mixed
waitSignal(mixed $signo, mixed|null $timeout = null)
No description
static mixed
waitEvent(mixed $fd, mixed|null $events = null, mixed|null $timeout = null)
No description
static mixed
fread(mixed $handle, mixed|null $length = null)
No description
static mixed
fgets(mixed $handle)
No description
static mixed
fwrite(mixed $handle, mixed $string, mixed|null $length = null)
No description