Skip to content

[13.x] Support Concurrency Run Timeouts#60105

Merged
taylorotwell merged 1 commit into
laravel:13.xfrom
dbpolito:feature/concurrency-run-timeout
May 13, 2026
Merged

[13.x] Support Concurrency Run Timeouts#60105
taylorotwell merged 1 commit into
laravel:13.xfrom
dbpolito:feature/concurrency-run-timeout

Conversation

@dbpolito
Copy link
Copy Markdown
Contributor

Concurrency::run() currently uses the process driver by default, where each task is executed through Laravel’s process layer. That process layer has a default 60-second timeout, but Concurrency::run() did not expose a way to customize it.

This PR adds support for passing a custom timeout when using the process driver:

Concurrency::run([
    fn () => longRunningTask(),
], timeout: 300);

The fork driver is left unchanged because spatie/fork does not support task timeouts. The sync driver also keeps its existing behavior, since it runs tasks inline and a process timeout would not apply.

- add optional timeout arguments to concurrency run contracts
- apply custom timeouts to process driver pool commands
- document facade timeout usage and cover process behavior
@taylorotwell taylorotwell merged commit 0d89d7c into laravel:13.x May 13, 2026
53 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants