mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
custom threads: use PTHREADS_INHERIT_NONE by default
this has the most reliable behaviour, because some stuff like respect/validation likes to include files unconditionally which declare functions that are already declared, which breaks due to the lack of function autoloading.
This commit is contained in:
parent
541cfee615
commit
6d6f8c3c38
@ -23,7 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\thread;
|
||||
|
||||
use const PTHREADS_INHERIT_ALL;
|
||||
use const PTHREADS_INHERIT_NONE;
|
||||
|
||||
/**
|
||||
* This class must be extended by all custom threading classes
|
||||
@ -31,7 +31,7 @@ use const PTHREADS_INHERIT_ALL;
|
||||
abstract class Thread extends \Thread{
|
||||
use CommonThreadPartsTrait;
|
||||
|
||||
public function start(int $options = PTHREADS_INHERIT_ALL) : bool{
|
||||
public function start(int $options = PTHREADS_INHERIT_NONE) : bool{
|
||||
//this is intentionally not traitified
|
||||
ThreadManager::getInstance()->add($this);
|
||||
|
||||
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\thread;
|
||||
|
||||
use const PTHREADS_INHERIT_ALL;
|
||||
use const PTHREADS_INHERIT_NONE;
|
||||
|
||||
/**
|
||||
* This class must be extended by all custom threading classes
|
||||
@ -31,7 +31,7 @@ use const PTHREADS_INHERIT_ALL;
|
||||
abstract class Worker extends \Worker{
|
||||
use CommonThreadPartsTrait;
|
||||
|
||||
public function start(int $options = PTHREADS_INHERIT_ALL) : bool{
|
||||
public function start(int $options = PTHREADS_INHERIT_NONE) : bool{
|
||||
//this is intentionally not traitified
|
||||
ThreadManager::getInstance()->add($this);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user