Skip to content
Permalink
Browse files

Suppress extra thing

  • Loading branch information...
muglug committed Jun 15, 2019
1 parent 38cee39 commit d7f5fa29df00b3e156c5772182ef5777a19b50e2
Showing with 2 additions and 11 deletions.
  1. +2 −11 src/Psalm/Internal/Fork/Pool.php
@@ -42,6 +42,7 @@ class Pool
* A closure to execute when a task is done
*
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedArgument
*/
public function __construct(
array $process_task_data_iterator,
@@ -133,7 +134,7 @@ public function __construct(
$task_done_buffer = '';
foreach ($task_data_iterator as $i => $task_data) {
$task_result = self::runTaskClosure($task_closure, $i, $task_data);
$task_result = $task_closure($i, $task_data);
$task_done_message = new ForkTaskDoneMessage($task_result);
$serialized_message = $task_done_buffer . base64_encode(serialize($task_done_message)) . PHP_EOL;
@@ -177,16 +178,6 @@ public function __construct(
exit(self::EXIT_SUCCESS);
}
/**
* @param \Closure(int, mixed):mixed $task_closure
* @param mixed $task_data
* @return mixed
*/
private static function runTaskClosure(\Closure $task_closure, int $i, $task_data)
{
return $task_closure($i, $task_data);
}
/**
* Prepare the socket pair to be used in a parent process and
* return the stream the parent will use to read results.

0 comments on commit d7f5fa2

Please sign in to comment.
You can’t perform that action at this time.