Exemplo n.º 1
0
 public function writeToClosedChannel()
 {
     ChannelWrapper::capture(newinstance(Runnable::class, [], ['run' => function () {
         $s = new ChannelOutputStream("output");
         $s->close();
         $s->write("whatever");
     }]));
 }
Exemplo n.º 2
0
 public function run()
 {
     $s = new ChannelOutputStream("output");
     $s->close();
     $s->write("whatever");
 }