From 763c8ebfe3bb8a597768d86040fee130c8fc7ab8 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 21 Jun 2020 19:07:01 +0100 Subject: [PATCH] Thread/Worker: drop nullability flag from start() (fixed in pthreads 3.2.0, which we require as a minimum) --- src/pocketmine/Thread.php | 4 +--- src/pocketmine/Worker.php | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pocketmine/Thread.php b/src/pocketmine/Thread.php index 86d923316..5a174c2dc 100644 --- a/src/pocketmine/Thread.php +++ b/src/pocketmine/Thread.php @@ -76,11 +76,9 @@ abstract class Thread extends \Thread{ } /** - * @param int|null $options TODO: pthreads bug - * * @return bool */ - public function start(?int $options = PTHREADS_INHERIT_ALL){ + public function start(int $options = PTHREADS_INHERIT_ALL){ ThreadManager::getInstance()->add($this); if($this->getClassLoader() === null){ diff --git a/src/pocketmine/Worker.php b/src/pocketmine/Worker.php index 3687e80b4..ea8d4c871 100644 --- a/src/pocketmine/Worker.php +++ b/src/pocketmine/Worker.php @@ -76,11 +76,9 @@ abstract class Worker extends \Worker{ } /** - * @param int|null $options TODO: pthreads bug - * * @return bool */ - public function start(?int $options = PTHREADS_INHERIT_ALL){ + public function start(int $options = PTHREADS_INHERIT_ALL){ ThreadManager::getInstance()->add($this); if($this->getClassLoader() === null){