New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add concurrent option #10
Conversation
@@ -29,6 +30,33 @@ public function it_will_execute_the_given_closures() | |||
$this->assertEquals([2, 4], $results); | |||
} | |||
|
|||
/** @test */ | |||
public function it_will_execute_the_given_closures_with_concurrency_cap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
src/Fork.php
Outdated
|
||
$output[$task->order()] = $taskOutput; | ||
if (count($queue)) { | ||
$i = array_key_first($queue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice.
We could opt to extract some things in waitFor
to their own functions so it's more clear what it happing there. If it would make it easier, I wouldn't made setting $running
as an instance variable.
This reverts commit 0f7e3e8.
PHP cs is acting up, but I'm going to merge it nevertheless. |
wrong button >< |
No description provided.