We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ee80755 + 90a6193 commit c79b4c1Copy full SHA for c79b4c1
src/Fork.php
@@ -129,7 +129,7 @@ protected function forkForTask(Task $task): Task
129
try {
130
$this->executeInChildTask($task, $socketToParent);
131
} finally {
132
- $this->exit();
+ exit();
133
}
134
135
tests/ForkTest.php
@@ -138,3 +138,17 @@ function () {
138
fn () => 1
139
);
140
});
141
+
142
+test('allow 2nd process to be done before the 1st')
143
+ ->expect(
144
+ fn () => Fork::new()->run(
145
+ static function () {
146
+ usleep(200_000);
147
+ return 2;
148
+ },
149
150
+ usleep(100_000);
151
+ return 1;
152
153
+ )
154
+ )->toEqual([2,1]);
0 commit comments