public function readingFromClosedChannel() { ChannelWrapper::capture(newinstance(Runnable::class, [], ['run' => function () { $s = new ChannelInputStream('input'); $s->close(); $s->read(); }])); }
public function run() { $s = new ChannelInputStream('input'); $s->close(); $s->read(); }