Releases: icicleio/concurrent
Releases · icicleio/concurrent
v0.3.0
Added
- Added
Icicle\Concurrent\Worker\factory()
function that accesses or sets the global worker factory. - Added
Icicle\Concurrent\Worker\get()
function that returns a worker from the global worker pool.
Changed
Icicle\Concurrent\Worker\Environment
is now an interface, withIcicle\Concurrent\Worker\BasicEnvironment
being the default implementation provided to workers that is then provided toIcicle\Concurrent\Worker\Task::run()
. Workers with different implementations ofEnvironment
can be easily created for particular applications.Icicle\Concurrent\Worker\Queue
has been removed. The functionality of queues has been merged intoIcicle\Concurrent\Worker\Pool
through a newget()
method that returns a worker from the pool. The returned worker is marked as busy until all references have been destroyed. See the example code below.
use Icicle\Concurrent\Worker\DefaultPool;
$pool = new DefaultPool();
$pool->start();
$worker = $pool->get(); // Marks $worker as busy in the pool.
// Use $worker for a series of tasks.
$worker = null; // Marks worker as idle in the pool.
v0.2.2
Added
- Added the
Icicle\Concurrent\Strand
interface that combinesIcicle\Concurrent\Context
andIcicle\Concurrent\Sync\Channel
. This interface is implemented by the following classes (note that these classes implemented the two component interface separately, so no changes were made to the implementation):Icicle\Concurrent\Forking\Fork
Icicle\Concurrent\Threading\Thread
Icicle\Concurrent\Process\ChannelledProcess
Changed
- An object implementing
Icicle\Concurrent\Strand
is now required by the constructor ofIcicle\Concurrent\Worker\AbstractWorker
.
v0.2.1
Added
- Added
Icicle\Concurrent\Worker\DefaultQueue
implementingIcicle\Concurrent\Worker\Queue
that provides a queue of workers that can be pulled and pushed from the queue as needed. Pulling a worker marks it as busy and pushing the worker back into the queue marks it as idle. If no idle workers remain in the queue, a worker is selected from those marked as busy. A worker queue allows a set of interdependent tasks (for example, tasks that depend on an environment value in the worker) to be run on a single worker without having to create and start separate workers for each task.
Fixed
- Fixed bug where exit status was not being read in
Icicle\Concurrent\Process\Process
, which also causedIcicle\Concurrent\Worker\WorkerProcess
to fail.
v0.2.0
v0.1.1
0.1.0: First stable release!
This is the first stable release of concurrent.
New features
- Creating and controlling multiple threads with
Icicle\Concurrent\Threading\Thread
- Creating and controlling multiple forked processes with
Icicle\Concurrent\Forking\Fork
- Workers and tasks, which can use either threading, forks, or a separate PHP process
- A global worker pool that any tasks can be run in
- Channels for sending messages across execution contexts
- Parcels for storing values and objects in shared memory locations for use across contexts
- Non-blocking mutexes and semaphores for protecting parcels
Changes
icicleio/socket
is no longer a dependency andicicleio/stream
was updated to 0.4.x.- Both channel interfaces were combined into
Icicle\Concurrent\Sync\Channel
Icicle\Concurrent\ContextInterface
no longer extends a channel interfaceIcicle\Concurrent\Forking\Fork
andIcicle\Concurrent\Process\Process
now implementIcicle\Concurrent\ProcessInterface
This is a stable release, so it will be officially supported until it is succeeded by a new stable release.
See http://icicleio.github.io/docs for documentation (still a work in progress).
Please report any bugs you encounter by making an issue.
v0.1.0-beta1
Yay! This looks pretty much like what we want to release with. This is a pre-release for v0.1 that supports all the goodies: threads, forks, workers, and worker pools. Updated documentation and small tweaks may come between this and the stable v0.1 release.
This is the first pinpointed version in the package -- use this version explicitly if you are using the library as-is. (Or wait a few days for stable v0.1.)