You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read your ReadMe and installed laravel-async to my current project.
All things are worked well, but only one problem is occured.
It is running synchronously.
use VXM\Async\AsyncFacade as Async;
for ($i = 1; $i < 20; $i++) {
Async::run(function () use ($i) {
sleep(1);
return $i;
});
}
var_dump(implode(', ', Async::wait()));
And run following command to add config file, and asyn.php like your code is added to config directory. php artisan vendor:publish --provider="VXM\Async\AsyncServiceProvider" --tag="config"
After running this code, I can get result like this. "string(65) "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
Is there anything I need to configure my project to run asynchronously?
Thanks.
The text was updated successfully, but these errors were encountered:
I read your ReadMe and installed laravel-async to my current project.
All things are worked well, but only one problem is occured.
It is running synchronously.
And run following command to add config file, and asyn.php like your code is added to config directory.
php artisan vendor:publish --provider="VXM\Async\AsyncServiceProvider" --tag="config"
After running this code, I can get result like this.
"string(65) "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
Is there anything I need to configure my project to run asynchronously?
Thanks.
The text was updated successfully, but these errors were encountered: