diff options
| author | bors <bors@rust-lang.org> | 2014-01-01 13:21:48 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-01 13:21:48 -0800 |
| commit | 48918fab7226593a4ad406cd83edb46e5c15dd15 (patch) | |
| tree | 26b5b7697a984e21b9fb7aae896fee6e484405ca /src/rustllvm/RustWrapper.cpp | |
| parent | c34ef5d7e4f44f8e65600a2c3866f5861c401ea1 (diff) | |
| parent | 3f11f8738201dcf230a1647e30c312c980513b37 (diff) | |
| download | rust-48918fab7226593a4ad406cd83edb46e5c15dd15.tar.gz rust-48918fab7226593a4ad406cd83edb46e5c15dd15.zip | |
auto merge of #11212 : alexcrichton/rust/local-task-count, r=brson
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).
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
