Absorb pocketmine/log-pthreads into PM core

this was previously part of the abandoned package pocketmine/spl. It had to be separated in the PM3 days, because RakLib depended on it.

Since RakLib 0.13, RakLib stopped being dependent on or aware of pthreads, so it no longer depends on any thread-related packages.
It's also possible to absorb pocketmine/snooze and pocketmine/classloader back into the core with this in mind.
This commit is contained in:
Dylan K. Taylor
2023-05-20 16:57:24 +01:00
parent 9509d7e04d
commit 097feba4d5
10 changed files with 139 additions and 56 deletions

View File

@ -26,6 +26,7 @@ namespace pocketmine\network\mcpe\raklib;
use pmmp\thread\Thread as NativeThread;
use pmmp\thread\ThreadSafeArray;
use pocketmine\snooze\SleeperNotifier;
use pocketmine\thread\log\ThreadSafeLogger;
use pocketmine\thread\NonThreadSafeValue;
use pocketmine\thread\Thread;
use raklib\generic\SocketException;
@ -55,7 +56,7 @@ class RakLibServer extends Thread{
* @phpstan-param ThreadSafeArray<int, string> $threadToMainBuffer
*/
public function __construct(
protected \ThreadSafeLogger $logger,
protected ThreadSafeLogger $logger,
protected ThreadSafeArray $mainToThreadBuffer,
protected ThreadSafeArray $threadToMainBuffer,
InternetAddress $address,