Queueing and parallel execution of tasks