File Manager Lite
Dir:
/home/codewavebd/public_html/vendor/laravel/framework/src/Illuminate/Concurrency
Upload
[..]
ConcurrencyManager.php (2.48 KB)
Edit
Rename
Del
ConcurrencyServiceProvider.php (692 B)
Edit
Rename
Del
Console/
Rename
Del
ForkDriver.php (1.08 KB)
Edit
Rename
Del
LICENSE.md (1.05 KB)
Edit
Rename
Del
ProcessDriver.php (2.99 KB)
Edit
Rename
Del
SyncDriver.php (858 B)
Edit
Rename
Del
composer.json (1.04 KB)
Edit
Rename
Del
Edit: SyncDriver.php
<?php namespace Illuminate\Concurrency; use Carbon\CarbonInterval; use Closure; use Illuminate\Contracts\Concurrency\Driver; use Illuminate\Support\Collection; use Illuminate\Support\Defer\DeferredCallback; use function Illuminate\Support\defer; class SyncDriver implements Driver { /** * Run the given tasks concurrently and return an array containing the results. */ public function run(Closure|array $tasks, CarbonInterval|int|null $timeout = null): array { return Collection::wrap($tasks)->map( fn ($task) => $task() )->all(); } /** * Start the given tasks in the background after the current task has finished. */ public function defer(Closure|array $tasks): DeferredCallback { return defer(fn () => Collection::wrap($tasks)->each(fn ($task) => $task())); } }
Simpan