From affe305e932f5512f17c51952198d36caa8814e6 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Thu, 20 Jul 2017 23:36:53 -0500 Subject: [PATCH] Use null for new scope --- lib/Forking/Fork.php | 2 +- lib/Threading/Internal/Thread.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Forking/Fork.php b/lib/Forking/Fork.php index ce643e8..9c01551 100644 --- a/lib/Forking/Fork.php +++ b/lib/Forking/Fork.php @@ -205,7 +205,7 @@ class Fork implements Process, Strand { private function execute(Channel $channel): \Generator { try { if ($this->function instanceof \Closure) { - $result = call($this->function->bindTo($channel, Channel::class), ...$this->args); + $result = call($this->function->bindTo($channel, null), ...$this->args); } else { $result = call($this->function, ...$this->args); } diff --git a/lib/Threading/Internal/Thread.php b/lib/Threading/Internal/Thread.php index af9a79e..b6ba833 100644 --- a/lib/Threading/Internal/Thread.php +++ b/lib/Threading/Internal/Thread.php @@ -121,7 +121,7 @@ class Thread extends \Thread { private function execute(Channel $channel): \Generator { try { if ($this->function instanceof \Closure) { - $result = call($this->function->bindTo($channel, Channel::class), ...$this->args); + $result = call($this->function->bindTo($channel, null), ...$this->args); } else { $result = call($this->function, ...$this->args); }