Download the PHP package igorsgm/illuminate-concurrency without Composer

On this page you can find all versions of the php package igorsgm/illuminate-concurrency. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package illuminate-concurrency

Illuminate Concurrency

A standalone extraction of Laravel's Concurrency component for use outside of the full laravel/framework package.

Why does this package exist?

Laravel ships many of its components as standalone illuminate/* packages, allowing developers to use them in non-Laravel projects or micro-frameworks. However, the Concurrency component has not yet been split into its own illuminate/concurrency package — it only lives inside the monolithic laravel/framework repository.

This package extracts the Concurrency component exactly as it exists in laravel/framework, making it installable as a first-class Composer dependency without pulling in the entire framework.

Installation

Optional: Before using the fork driver, you need to install the spatie/fork package:

Concurrency (from Laravel Docs)

Introduction

Sometimes you may need to execute several slow tasks which do not depend on one another. In many cases, significant performance improvements can be realized by executing the tasks concurrently. Laravel's Concurrency facade provides a simple, convenient API for executing closures concurrently.

How it Works

Laravel achieves concurrency by serializing the given closures and dispatching them to a hidden Artisan CLI command, which unserializes the closures and invokes it within its own PHP process. After the closure has been invoked, the resulting value is serialized back to the parent process.

The Concurrency facade supports three drivers:

Driver Description Requires
process Runs tasks in parallel child processes (default)
fork Uses pcntl_fork for true parallel execution. Offers improved performance compared to the default process driver, but it may only be used within PHP's CLI context, as PHP does not support forking during web requests. spatie/fork, CLI only
sync Primarily useful during testing when you want to disable all concurrency and simply execute the given closures in sequence within the parent process.

Running Concurrent Tasks

To run concurrent tasks, you may invoke the Concurrency facade's run method. The run method accepts an array of closures which should be executed simultaneously in child PHP processes:

To use a specific driver, you may use the driver method:

Or, to change the default concurrency driver, you should publish the concurrency configuration file via the config:publish Artisan command and update the default option within the file:

Deferring Concurrent Tasks

If you would like to execute an array of closures concurrently, but are not interested in the results returned by those closures, you should consider using the defer method. When the defer method is invoked, the given closures are not executed immediately. Instead, Laravel will execute the closures concurrently after the HTTP response has been sent to the user:

Source

This package mirrors the source code from:

License

The MIT License (MIT). See LICENSE.md for details.


All versions of illuminate-concurrency with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^12.0
illuminate/contracts Version ^12.0
illuminate/process Version ^12.0
illuminate/support Version ^12.0
laravel/serializable-closure Version ^1.3|^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package igorsgm/illuminate-concurrency contains the following files

Loading the files please wait ...