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
Process
renamed toProcessContext
Context::isRunning()
andContext::kill()
replaced byContext::isClosed()
andContext::close()
- Context related functions:
run
→startContext
factory
→contextFactory
create
has been removed, usestartContext
Worker
Pool
renamed toWorkerPool
andDefaultPool
renamed toDefaultWorkerPool
TaskWorker
renamed toDefaultWorker
TaskRunner
has been moved to a function,runTasks
- Removed deprecated
TaskException
andTaskError
Worker::enqueue()
renamed toWorker::submit()
, which now returns anExecution
objectExecution::getResult()
returns a future that resolves to the eventual return value of theTask
Execution::getChannel()
returns aChannel
that can be used to communicate with theChannel
provided toTask::run()
- The arguments to
Task::run()
have changed toChannel
,Cache
, andCancellation