function runtasks_parall($tasks, $args = array()) { return \taskman_runtasks_parall($tasks, $args); }
function taskman_runtasks($tasks, $args = array()) { foreach ($tasks as $task_spec) { if (is_scalar($task_spec)) { taskman_runtask($task_spec, $args); } else { if (is_array($task_spec)) { taskman_runtasks_parall($task_spec, $args); } else { if (is_object($task_spec)) { $task_spec->run($args); } else { throw new TaskmanException("Invalid task specification '{$task_spec}', should be either string or array or object"); } } } } }