about summary refs log tree commit diff
path: root/src/libstd/rt/mod.rs
AgeCommit message (Collapse)AuthorLines
2013-08-12Reorganise Select traits to not expose internal runtime types. Close #5160. ↵Ben Blum-2/+1
Pending #8215.
2013-08-10std: merge Iterator and IteratorUtilErick Tryzelaar-1/+1
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-09Remove the C++ runtime. SayonaraBrian Anderson-31/+2
2013-08-09std: Fix perf of local allocations in newschedBrian Anderson-19/+32
Mostly optimizing TLS accesses to bring local heap allocation performance closer to that of oldsched. It's not completely at parity but removing the branches involved in supporting oldsched and optimizing pthread_get/setspecific to instead use our dedicated TCB slot will probably make up for it.
2013-08-08Enabled workstealing in the scheduler. Previously we had one global work ↵toddaaro-10/+22
queue shared by each scheduler. Now there is a separate work queue for each scheduler, and work is "stolen" from other queues when it is exhausted locally.
2013-08-07std: Allow spawners to specify stack sizeBrian Anderson-4/+3
2013-08-07std::rt: Pull RUST_MIN_STACK from the environmentBrian Anderson-0/+1
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-1/+1
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-04std::rt: Remove the test for context()Brian Anderson-10/+0
This is no longer testable once newsched is turned on
2013-08-03remove obsolete `foreach` keywordDaniel Micay-2/+2
this has been replaced by `for`
2013-08-01fixed incorrect handling of returned scheduler option and restructed ↵toddaaro-2/+10
scheduler functions slightly
2013-08-01minor tweaks - unboxed the coroutine so that it is no longer a ~ pointer ↵toddaaro-14/+26
inside the task struct, and also added an assert to verify that send is never called inside scheduler context as it is undefined (BROKEN) if that happens
2013-08-01A major refactoring that changes the way the runtime uses TLS. In thetoddaaro-59/+51
old design the TLS held the scheduler struct, and the scheduler struct held the active task. This posed all sorts of weird problems due to how we wanted to use the contents of TLS. The cleaner approach is to leave the active task in TLS and have the task hold the scheduler. To make this work out the scheduler has to run inside a regular task, and then once that is the case the context switching code is massively simplified, as instead of three possible paths there is only one. The logical flow is also easier to follow, as the scheduler struct acts somewhat like a "token" indicating what is active. These changes also necessitated changing a large number of runtime tests, and rewriting most of the runtime testing helpers. Polish level is "low", as I will very soon start on more scheduler changes that will require wiping the polish off. That being said there should be sufficient comments around anything complex to make this entirely respectable as a standalone commit.
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-1/+1
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01auto merge of #8158 : bblum/rust/task-cleanup, r=brsonbors-0/+2
r? @brson
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-3/+3
2013-07-31Give tasks useful names. #2891Ben Blum-0/+2
2013-07-31auto merge of #8139 : brson/rust/rm-old-task-apis, r=pcwaltonbors-1/+3
This removes a bunch of options from the task builder interface that are irrelevant to the new scheduler and were generally unused anyway. It also bumps the stack size of new scheduler tasks so that there's enough room to run rustc and changes the interface to `Thread` to not implicitly join threads on destruction, but instead require an explicit, and mandatory, call to `join`.
2013-07-30std::rt: Change Thread interface to require an explicit joinBrian Anderson-1/+3
Makes it more obvious what's going on
2013-07-30Implement select() for new runtime pipes.Ben Blum-0/+3
2013-07-27auto merge of #8076 : omasanori/rust/cleanup, r=huonwbors-2/+0
A cleanup suggested on #7922.
2013-07-27std::rt: Add start_on_main_thread functionBrian Anderson-10/+61
Applications that need to use the GUI can override start and set up the runtime using this function.
2013-07-27Remove unnecessary #[path = "***/mod.rs"] lines.OGINO Masanori-2/+0
Fixes #7922. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-2/+2
Place `pub` or `priv` on individual items instead.
2013-07-20Change the HOF context switchers to pass a BlockedTask instead of a ~Task.Ben Blum-1/+1
2013-07-20Remove join_latchBen Blum-3/+0
2013-07-20Add kill::Death for task death services and use it in Task.Ben Blum-1/+1
2013-07-20Add KillHandle and implement exit code propagation to replace join_latchBen Blum-0/+3
2013-07-09std: Make os::set_exit_status work with newschedBrian Anderson-1/+9
2013-07-03Merge remote-tracking branch 'mozilla/master'Brian Anderson-1/+0
Conflicts: src/libextra/test.rs src/libstd/at_vec.rs src/libstd/cleanup.rs src/libstd/rt/comm.rs src/libstd/rt/global_heap.rs src/libstd/task/spawn.rs src/libstd/unstable/lang.rs src/libstd/vec.rs src/rt/rustrt.def.in src/test/run-pass/extern-pub.rs
2013-07-01Refactored the runtime to view coroutines as a component of tasks, instead ↵toddaaro-7/+6
of tasks as a component of coroutines.
2013-06-24extra: Make test runner compatible with newschedBrian Anderson-7/+2
2013-06-24std::rt: deny(unused_unsafe)Brian Anderson-1/+2
2013-06-24std: Make box annihilator work with newschedBrian Anderson-1/+1
2013-06-24std: Move dynamic borrowck code from unstable::lang to rt::borrowckBrian Anderson-0/+3
2013-06-21std::rt: Support os::argsBrian Anderson-7/+19
2013-06-19std::rt: Update GC metadata in initBrian Anderson-0/+5
2013-06-19std::rt: Document and cleanup the run functionBrian Anderson-10/+30
2013-06-19std::rt: Correct the numbers of default coresBrian Anderson-6/+1
2013-06-19std::rt: Set the process exit codeBrian Anderson-5/+19
2013-06-18std::rt: Turn on multithreaded schedulingBrian Anderson-16/+76
2013-06-17std::rt: Check exchange count on exitBrian Anderson-0/+6
2013-06-17std::rt: Add util mod and num_cpus functionBrian Anderson-0/+3
2013-06-16Merge remote-tracking branch 'brson/io'Brian Anderson-13/+26
Conflicts: src/libstd/rt/comm.rs src/libstd/rt/mod.rs src/libstd/rt/sched.rs src/libstd/rt/task.rs src/libstd/rt/test.rs src/libstd/rt/tube.rs src/libstd/rt/uv/uvio.rs src/libstd/rt/uvio.rs src/libstd/task/spawn.rs
2013-06-15Merge remote-tracking branch 'brson/io-wip' into ioBrian Anderson-2/+5
Conflicts: src/libstd/rt/sched.rs src/libstd/rt/task.rs src/libstd/rt/test.rs src/libstd/task/mod.rs src/libstd/task/spawn.rs
2013-06-13std::rt: Change the Task constructors to reflect a treeBrian Anderson-2/+2
2013-06-13std::rt: Add JoinLatchBrian Anderson-0/+3
This is supposed to be an efficient way to link the lifetimes of tasks into a tree. JoinLatches form a tree and when `release` is called they wait on children then signal the parent. This structure creates zombie tasks which currently keep the entire task allocated. Zombie tasks are supposed to be tombstoned but that code does not work correctly.
2013-06-10debugged a compiler ICE when merging local::borrow changes into the main io ↵toddaaro-1/+1
branch and modified the incoming new file lang.rs to be api-compatible
2013-06-04std::cell: Modernize constructorsPhilipp Brüschweiler-2/+2
Part of #3853