This is automatic generated document for things in Swow namespace
Function defer
Run a task when the current function frame ends.
A return or an exception ends the frame. Tasks run in reverse order. In the main scope the tasks run at request shutdown.
Function fileno
get the file descriptor of a stream
Param resource $stream the stream to get the file descriptor of, must be a PHP stream resource
Throws \Swow\Exception when failed to get the file descriptor
Function nproc
get Number of PROCessors
Param int $kind processors count kind, currently only support Swow\NPROC_AVAILABLE which means the number of available (i.e. online logical cores) processors
Throws \Swow\Exception when failed to get the number of processors
Function pipe
create a pipe pair like pipe(2)
Param int $rflags read end flags, default is 0 Param int $wflags write end flags, default is 0
Returns (array{0: resource, 1: resource} | null) the first element is the read end, the second element is the write end
Throws \Swow\Exception when failed to create pipe
Function pipe_from_fd
create a pipe from a file descriptor
The descriptor must be a pipe. The returned stream takes ownership of it. When the stream closes, the descriptor closes too. The mode is not checked.
Param int $fd the file descriptor to create a pipe from Param string $mode the mode of the pipe, expected to be r or w
Returns resource the pipe resource
Throws \Swow\Exception when the descriptor is not a pipe
Classes
Class Buffer
Class BufferException
Class CallException
Class Channel
Class ChannelException
Class Coroutine
Class CoroutineException
Class Defer
Class Errno
Class Exception
Class Extension
Class Futex
Class IpAddress
Class IpAddressException
Class Library
Class Log
Class Mutex
Class Selector
Class SelectorException
Class Semaphore
Class SharedBuffer
Class Signal
Class SignalException
Class Socket
Class SocketException
Class SpscQueue
Class SpscQueueException
Class SyncException
Class Thannel
Class ThannelException
Class Thread
Class ThreadException
Class ThreadManager
Class ThreadManagerException
Interface ThreadManagerInterface
Class ThreadWorkerContext
Class Watchdog
Class WatchdogException
Table of contents
- Class Swow\Buffer
- Class Swow\BufferException
- Class Swow\CallException
- Class Swow\Channel
- Class Swow\ChannelException
- Class Swow\Coroutine
- Class Swow\CoroutineException
- Class Swow\Defer
- Class Swow\Errno
- Class Swow\Exception
- Class Swow\Extension
- Class Swow\Futex
- Class Swow\IpAddress
- Class Swow\IpAddressException
- Class Swow\Library
- Class Swow\Log
- Class Swow\Mutex
- Class Swow\Selector
- Class Swow\SelectorException
- Class Swow\Semaphore
- Class Swow\SharedBuffer
- Class Swow\Signal
- Class Swow\SignalException
- Class Swow\Socket
- Class Swow\SocketException
- Class Swow\SpscQueue
- Class Swow\SpscQueueException
- Class Swow\SyncException
- Class Swow\Thannel
- Class Swow\ThannelException
- Class Swow\Thread
- Class Swow\ThreadException
- Class Swow\ThreadManager
- Class Swow\ThreadManagerException
- Class Swow\ThreadWorkerContext
- Class Swow\Watchdog
- Class Swow\WatchdogException
- Interface Swow\ThreadManagerInterface