Repository navigation
2.0.0 Beta 1
Pre-release
Pre-release
Initial release compatible with AMPHP v3.
All classes related to ext-pthreads and ext-parallel have been removed as both extension do not have releases on PHP 8.x.
Classes in the Amp\Parallel\Sync namespace have been moved to amphp/sync.
Context
Processrenamed toProcessContextContext::isRunning()andContext::kill()replaced byContext::isClosed()andContext::close()- Context related functions:
run→startContextfactory→contextFactorycreatehas been removed, usestartContext
Worker
Poolrenamed toWorkerPoolandDefaultPoolrenamed toDefaultWorkerPoolTaskWorkerrenamed toDefaultWorkerTaskRunnerhas been moved to a function,runTasks- Removed deprecated
TaskExceptionandTaskError Worker::enqueue()renamed toWorker::submit(), which now returns anExecutionobjectExecution::getResult()returns a future that resolves to the eventual return value of theTaskExecution::getChannel()returns aChannelthat can be used to communicate with theChannelprovided toTask::run()- The arguments to
Task::run()have changed toChannel,Cache, andCancellation