isRunning()) { $instance->start(); } return $instance; } /** * Enqueues a task to be executed by the worker pool. * * @param TaskInterface $task The task to enqueue. * * @return \Icicle\Promise\PromiseInterface * * @resolve mixed The return value of the task. */ function enqueue(TaskInterface $task /* , ...$args */) { return new Coroutine(call_user_func_array([pool(), 'enqueue'], func_get_args())); } }