lập trình

Nhánh quy trình – Đoạn mã

« trở lại — được viết bởi Dầu Brent vào ngày 09 tháng 6 năm 2017 function async(Process $process) : Process { socket_create_pair(AF_UNIX, SOCK_STREAM, 0, $sockets); ($parentSocket, $childSocket) = $sockets; if (($pid = pcntl_fork()) == 0) { socket_close($childSocket); socket_write($parentSocket, serialize($process->execute())); socket_close($parentSocket); exit; } socket_close($parentSocket); return $process ->setStartTime(time()) ->setPid($pid) ->setSocket($childSocket); } function wait(array $processes) : array

Nhánh quy trình – Đoạn mã Read More »

Scroll to Top