$ git tag

$ git branch
* master


This is a library to help manage "threads" spawned through forking. It contains a core Thread class as well as a number of utility classes such as ThreadPool that efficiently executes a queue of threads.

Spawning threads

use NoccyLabs\Async\Thread;

function myThreadFunc() {
    // ..

$thread = new Thread("myThreadFunc");

// Wait for the thread using one of these
Thread::wait($thread, $otherThread, ...);

Managing a pool

use NoccyLabs\Async\Thread;
use NoccyLabs\Async\ThreadPool;

// Use 3 concurrent threads
$pool = new ThreadPool(3);
// Add your threads to the pool
// Start processing the queue