Skip to content

Releases: icicleio/concurrent

v0.3.0

15 Jan 19:10
Compare
Choose a tag to compare

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, with Icicle\Concurrent\Worker\BasicEnvironment being the default implementation provided to workers that is then provided to Icicle\Concurrent\Worker\Task::run(). Workers with different implementations of Environment can be easily created for particular applications.
  • Icicle\Concurrent\Worker\Queue has been removed. The functionality of queues has been merged into Icicle\Concurrent\Worker\Pool through a new get() 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

21 Dec 17:29
Compare
Choose a tag to compare

Added

  • Added the Icicle\Concurrent\Strand interface that combines Icicle\Concurrent\Context and Icicle\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 of Icicle\Concurrent\Worker\AbstractWorker.

v0.2.1

16 Dec 23:53
Compare
Choose a tag to compare

Added

  • Added Icicle\Concurrent\Worker\DefaultQueue implementing Icicle\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 caused Icicle\Concurrent\Worker\WorkerProcess to fail.

v0.2.0

14 Dec 00:06
Compare
Choose a tag to compare

This release contains some major bug fixes with workers and updates to fit with Icicle 0.9. See the CHANGELOG for in-depth details.

v0.1.1

14 Nov 03:28
Compare
Choose a tag to compare

This release contains some new methods to check if threads or forks are enabled, and a couple bug fixes. See the CHANGELOG for details.

0.1.0: First stable release!

29 Oct 00:29
Compare
Choose a tag to compare

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 and icicleio/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 interface
  • Icicle\Concurrent\Forking\Fork and Icicle\Concurrent\Process\Process now implement Icicle\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

30 Sep 03:19
Compare
Choose a tag to compare
v0.1.0-beta1 Pre-release
Pre-release

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.)