mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Require pthreads ^5.1
This version of pthreads has a substantially improved API, improved performance, improved memory usage, and much less magical and broken behaviour.
This commit is contained in:
@ -46,9 +46,9 @@ parameters:
|
||||
path: ../../../src/plugin/PluginManager.php
|
||||
|
||||
-
|
||||
message: "#^Offset \\(int\\|string\\) on array\\<pocketmine\\\\plugin\\\\Plugin\\> in isset\\(\\) always exists and is not nullable\\.$#"
|
||||
message: "#^Parameter \\#1 \\$work of method Worker\\:\\:stack\\(\\) expects Threaded, pocketmine\\\\scheduler\\\\AsyncTask given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/plugin/PluginManager.php
|
||||
path: ../../../src/scheduler/AsyncPool.php
|
||||
|
||||
-
|
||||
message: "#^Static property pocketmine\\\\scheduler\\\\AsyncTask\\:\\:\\$threadLocalStorage \\(ArrayObject\\<int, array\\<string, mixed\\>\\>\\|null\\) does not accept non\\-empty\\-array\\<int, non\\-empty\\-array\\<string, mixed\\>\\>\\|ArrayObject\\<int, array\\<string, mixed\\>\\>\\.$#"
|
||||
@ -56,12 +56,12 @@ parameters:
|
||||
path: ../../../src/scheduler/AsyncTask.php
|
||||
|
||||
-
|
||||
message: "#^Property pocketmine\\\\thread\\\\Thread\\:\\:\\$classLoaders \\(\\(iterable\\<ClassLoader\\>&Threaded\\)\\|null\\) does not accept array\\<int, ClassLoader\\>\\|\\(iterable\\<ClassLoader\\>&Threaded\\)\\.$#"
|
||||
message: "#^Property pocketmine\\\\thread\\\\Thread\\:\\:\\$classLoaders \\(ThreadedArray\\<int, ClassLoader\\>\\|null\\) does not accept array\\{ClassLoader\\}\\|ThreadedArray\\<int, ClassLoader\\>\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/thread/Thread.php
|
||||
|
||||
-
|
||||
message: "#^Property pocketmine\\\\thread\\\\Worker\\:\\:\\$classLoaders \\(\\(iterable\\<ClassLoader\\>&Threaded\\)\\|null\\) does not accept array\\<int, ClassLoader\\>\\|\\(iterable\\<ClassLoader\\>&Threaded\\)\\.$#"
|
||||
message: "#^Property pocketmine\\\\thread\\\\Worker\\:\\:\\$classLoaders \\(ThreadedArray\\<int, ClassLoader\\>\\|null\\) does not accept array\\{ClassLoader\\}\\|ThreadedArray\\<int, ClassLoader\\>\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/thread/Worker.php
|
||||
|
||||
|
@ -1,6 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @implements \Traversable<array-key, mixed>
|
||||
* @implements \IteratorAggregate<array-key, mixed>
|
||||
*/
|
||||
class Threaded implements \Traversable{}
|
||||
abstract class ThreadedBase implements \IteratorAggregate{
|
||||
|
||||
/**
|
||||
* @template TReturn
|
||||
* @param \Closure() : TReturn $function
|
||||
* @param mixed ...$args
|
||||
* @return TReturn
|
||||
*/
|
||||
public function synchronized(\Closure $function, mixed ...$args) : mixed{}
|
||||
}
|
||||
|
||||
/**
|
||||
* @template TKey of array-key
|
||||
* @template TValue
|
||||
* @implements ArrayAccess<TKey, TValue>
|
||||
*/
|
||||
final class ThreadedArray extends ThreadedBase implements Countable, ArrayAccess{
|
||||
|
||||
/**
|
||||
* @return TValue|null
|
||||
*/
|
||||
public function pop() : mixed{}
|
||||
|
||||
/**
|
||||
* @return TValue|null
|
||||
*/
|
||||
public function shift() : mixed{}
|
||||
}
|
Reference in New Issue
Block a user