core: Add task::spawn_sched
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.
This commit is contained in:
@@ -438,7 +438,7 @@ rust_get_sched_id() {
|
||||
}
|
||||
|
||||
extern "C" CDECL rust_sched_id
|
||||
rust_new_sched(size_t threads) {
|
||||
rust_new_sched(uintptr_t threads) {
|
||||
rust_task *task = rust_task_thread::get_task();
|
||||
A(task->thread, threads > 0,
|
||||
"Can't create a scheduler with no threads, silly!");
|
||||
|
||||
Reference in New Issue
Block a user