Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
IPC has been greatly improved in this release.
STDOUT were previously used for process communication, redirecting child process output to
STDERR. However, this was often problematic for debugging and caused to confusion. Processes now used a dedicated socket for IPC, leaving the standard I/O streams available for for the user. These streams can be accessed on
getStderr(). No automatic forwarding of child output is done for
Worker\WorkerProcess now automatically forwards
STDERR to the parent
printf(), etc. in
Worker\Task::run() is still not recommended as ordering is not guaranteed and interleaving is very possible. However, for debugging purposes these functions can be useful.
Users of this library that only used the
Worker\Pool interfaces are unlikely to need to make any changes to their code to upgrade from
0.2.x. Most other BC breaks are minor.
STDOUTof the process run using
Context\Processis no longer redirected to
STDERRof the parent process.
STDERRof the child process are now available as stream objects using
AbstractWorkerhas been renamed to
TaskWorker. The protected method
- Subsequent calls to
Worker::shutdown()now return the same promise as the first call. Prior, subsequent calls would throw an exception.
Context\Context::start()now returns a promise that is resolved once the context starts (or fails to start).
Context\Process::run()now returns a promise resolving to the instance of
Context\Thread::run()now returns a promise resolving to the instance of
Context\Thread::supported()has been renamed to
- Most classes in this library are now marked as final. (Composition over inheritance!)
- Error messages when tasks return unserializable data have been improved.
- Custom exception constructors skipping the code argument have been dropped in favor of using the standard constructor.
boolas a return type (implementations should have always returned a
bool, but is now declared in the interface).
Worker\Pool::get()has been renamed to
- The function
Worker\get()has been renamed to