Refactored main class, improved a few things here and there. Looks polished enough

This commit is contained in:
Netkas 2023-06-18 17:17:13 -04:00
parent 75c6062a3e
commit 411898af2a
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
14 changed files with 351 additions and 300 deletions

14
tests/exception_test.php Normal file
View file

@ -0,0 +1,14 @@
<?php
// Import everything
require 'ncc';
require __DIR__ . DIRECTORY_SEPARATOR . 'ExampleClass.php';
import('net.nosial.tamerlib');
// Initialize TamerLib
\TamerLib\tm::initialize(\TamerLib\Enums\TamerMode::CLIENT);
// Start 8 workers.
\TamerLib\tm::createWorker(8, __DIR__ . DIRECTORY_SEPARATOR . 'worker.php');
// Throw an exception, this be thrown in the client.
echo \TamerLib\tm::doWait('throwException');