Lines Matching refs:read
7 private array $read = []; variable in EventLoop
12 while (!empty($this->deferCallbacks) || !empty($this->read)) {
19 $this->select($this->read);
23 private function select(array $read): void argument
26 if (!stream_select($read, $write, $except, $timeout, $timeout)) {
30 foreach ($read as $id => $resource) {
32 unset($this->read[$id], $this->streamCallbacks[$id]);
42 public function read($resource, callable $callback): void function in EventLoop
45 $this->read[$id] = $resource;
50 [$read, $write] = stream_socket_pair(
57 stream_set_blocking($read, false);
63 $fiber = new Fiber(function () use ($loop, $read): void {
67 $loop->read($read, fn() => $fiber->resume());
70 $data = fread($read, 8192);