mozilla/rust — pull request #3498 by Blei (2012-09-14 13:08:43+00:00)
Title: core: Allocate threads on demand, not on scheduler startup

API change: rust_kernel::create_scheduler() or
rust_scheduler::rust_scheduler() respecitevly now take ownership of the
launch factory argument, it is needed to create new threads on demand.

Also renames rustrt::sched_threads() to rustrt::rust_sched_threads() for
consistency. Added rustrt::rust_max_sched_threads() to return the
maximal number of scheduled threads of the current scheduler.

Fixes #3493.

--

I'm not sure if the launch factory argument should be kernel-allocated (like the scheduler) or not. At the moment it's a simple heap allocation, please tell me if should change that.