rust/src/libstd/rt
Alex Crichton 3f11f87382 Move task count bookeeping out of libstd
For libgreen, bookeeping should not be global but rather on a per-pool basis.
Inside libnative, it's known that there must be a global counter with a
mutex/cvar.

The benefit of taking this strategy is to remove this functionality from libstd
to allow fine-grained control of it through libnative/libgreen. Notably, helper
threads in libnative can manually decrement the global count so they don't count
towards the global count of threads. Also, the shutdown process of *all* sched
pools is now dependent on the number of tasks in the pool being 0 rather than
this only being a hardcoded solution for the initial sched pool in libgreen.

This involved adding a Local::try_take() method on the Local trait in order for
the channel wakeup to work inside of libgreen. The channel send was happening
from a SchedTask when there is no Task available in TLS, and now this is
possible to work (remote wakeups are always possible, just a little slower).
2014-01-01 13:08:09 -08:00
..
args.rs std: silence warnings when compiling test. 2013-12-20 01:26:03 +11:00
borrowck.rs green: Rip the bandaid off, introduce libgreen 2013-12-24 19:59:52 -08:00
crate_map.rs green: Allow specifying an IoFactory for pools 2013-12-24 19:59:53 -08:00
env.rs green: Rip the bandaid off, introduce libgreen 2013-12-24 19:59:52 -08:00
global_heap.rs librustc: Remove identifiers named box, since it's about to become a keyword. 2013-12-15 10:41:15 -08:00
local_heap.rs librustc: Remove identifiers named box, since it's about to become a keyword. 2013-12-15 10:41:15 -08:00
local_ptr.rs Move task count bookeeping out of libstd 2014-01-01 13:08:09 -08:00
local.rs Move task count bookeeping out of libstd 2014-01-01 13:08:09 -08:00
logging.rs Removed useless cmp::{min, max} reexports from the integer modules 2013-11-29 20:19:22 +01:00
macros.rs Another round of test fixes from previous commits 2013-11-10 01:37:12 -08:00
mod.rs std: uniform modules titles for doc 2013-12-27 09:49:11 +01:00
rtio.rs Test fixes and rebase conflicts 2013-12-25 23:10:46 -08:00
task.rs Move task count bookeeping out of libstd 2014-01-01 13:08:09 -08:00
thread_local_storage.rs Remove dead codes 2013-12-08 02:55:28 -05:00
thread.rs Test fixes and rebase conflicts 2013-12-25 23:10:46 -08:00
unwind.rs Test fixes and rebase conflicts 2013-12-25 23:10:46 -08:00
util.rs Test fixes and rebase conflicts 2013-12-25 23:10:46 -08:00