mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/15090310700
This commit is contained in:
commit
d907d72e9b
@ -57,7 +57,7 @@
|
||||
"phpstan/phpstan-strict-rules": "^2.0.0",
|
||||
"phpunit/phpunit": "^10.5.24"
|
||||
},
|
||||
"provide": {
|
||||
"replace": {
|
||||
"symfony/polyfill-ctype": "*",
|
||||
"symfony/polyfill-mbstring": "*"
|
||||
},
|
||||
|
2
composer.lock
generated
2
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d8fa42f33a3bcb26014e6f862366dbd6",
|
||||
"content-hash": "ceb98091ac3f61f1a4b87708c48dc75a",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/json-comment",
|
||||
|
@ -94,7 +94,17 @@ trait CommonThreadPartsTrait{
|
||||
}
|
||||
}
|
||||
|
||||
public function getCrashInfo() : ?ThreadCrashInfo{ return $this->crashInfo; }
|
||||
public function getCrashInfo() : ?ThreadCrashInfo{
|
||||
//TODO: Joining a crashed worker might be a bit sus, but we need to make sure the thread's shutdown
|
||||
//handler has run before we try to collect the crash info. As of 6.1.1, pmmpthread sets isTerminated=true
|
||||
//*before* the shutdown handler is invoked, so we might land here before the crash info has been set.
|
||||
//In the future this should probably be fixed by running the shutdown handlers before setting isTerminated,
|
||||
//but this workaround should be good enough for now.
|
||||
if($this->isTerminated() && !$this->isJoined()){
|
||||
$this->join();
|
||||
}
|
||||
return $this->crashInfo;
|
||||
}
|
||||
|
||||
public function start(int $options = NativeThread::INHERIT_NONE) : bool{
|
||||
ThreadManager::getInstance()->add($this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user