PHP 8.3.31
Preview: ForkDriver.php Size: 773 B
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Concurrency/ForkDriver.php

<?php

namespace Illuminate\Concurrency;

use Closure;
use Illuminate\Contracts\Concurrency\Driver;
use Illuminate\Support\Arr;
use Illuminate\Support\Defer\DeferredCallback;
use Spatie\Fork\Fork;

use function Illuminate\Support\defer;

class ForkDriver implements Driver
{
    /**
     * Run the given tasks concurrently and return an array containing the results.
     */
    public function run(Closure|array $tasks): array
    {
        /** @phpstan-ignore class.notFound */
        return Fork::new()->run(...Arr::wrap($tasks));
    }

    /**
     * Start the given tasks in the background after the current task has finished.
     */
    public function defer(Closure|array $tasks): DeferredCallback
    {
        return defer(fn () => $this->run($tasks));
    }
}

Directory Contents

Dirs: 1 × Files: 7

Name Size Perms Modified Actions
Console DIR
- drwxrwxrwx 2025-09-17 06:52:59
Edit Download
964 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
2.54 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
692 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
773 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
1.05 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
2.32 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
790 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).