This function creates a new scheduler with a specified number of threads and immediately executes a task on it. The scheduler is configured to terminate when the task dies. This is the minimum API necessary to enable blocking C calls.