We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6537ab2 commit f5343a3Copy full SHA for f5343a3
src/Internal/Queue.php
@@ -19,19 +19,10 @@ public function enqueue(callable $task): void
19
private function drain(): void
20
{
21
for ($i = \key($this->queue); isset($this->queue[$i]); $i++) {
22
- $task = $this->queue[$i];
23
-
24
- $exception = null;
25
26
try {
27
- $task();
28
- } catch (\Throwable $exception) {
29
- }
30
31
- unset($this->queue[$i]);
32
33
- if ($exception) {
34
- throw $exception;
+ ($this->queue[$i])();
+ } finally {
+ unset($this->queue[$i]);
35
}
36
37
0 commit comments