about summary refs log tree commit diff
path: root/src/libstd/task/mod.rs
AgeCommit message (Collapse)AuthorLines
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-9/+6
2013-08-18auto merge of #8560 : kballard/rust/reserve-yield, r=pcwaltonbors-15/+15
Rename task::yield() to task::deschedule(). Fixes #8494.
2013-08-16Reserve 'yield' keywordKevin Ballard-15/+15
Rename task::yield() to task::deschedule(). Fixes #8494.
2013-08-16doc: correct spelling in documentation.Huon Wilson-3/+3
2013-08-12Clean up transitionary glue in task/spawn.rs. Don't hold kill-little-lock ↵Ben Blum-1/+0
for O(n) time, cf #3100, and optimize out several unneeded clone()s.
2013-08-09Remove the C++ runtime. SayonaraBrian Anderson-80/+30
2013-08-09std: Fix perf of local allocations in newschedBrian Anderson-7/+8
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-07Disable linked failure testsBrian Anderson-0/+19
The implementation currently contains a race that leads to segfaults.
2013-08-07std: Allow spawners to specify stack sizeBrian Anderson-4/+8
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-02librustc: Disallow "unsafe" for external functionsPatrick Walton-6/+6
2013-08-02Fix embarrassing bug where 'unkillable' would unwind improperly when it ↵Ben Blum-0/+41
receives a kill signal.
2013-08-02std: Implement SingleThreaded spawn mode for newschedBrian Anderson-5/+18
2013-08-01modified local to include an implementation for try_unsafe_borrow::<Task> so ↵toddaaro-6/+6
that the log methods will work
2013-08-01Have linked failure tests run on the new scheduler instead of requiring ↵Ben Blum-79/+152
RUST_NEWRT to test.
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-9/+9
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-07-31Move atomically to unstable::sync, and document what it actually does. Close ↵Ben Blum-53/+0
#7872.
2013-07-31Give tasks useful names. #2891Ben Blum-2/+57
2013-07-31auto merge of #8139 : brson/rust/rm-old-task-apis, r=pcwaltonbors-95/+0
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: Remove foreign_stack_size spawn option. Irrelevant to future FFI changesBrian Anderson-9/+0
2013-07-30std: Remove get_task function. UnusedBrian Anderson-15/+0
2013-07-30std: Remove CurrentScheduler spawn mode. UnusedBrian Anderson-2/+0
2013-07-30std: Remove ExistingScheduler spawn mode. UnusedBrian Anderson-13/+1
2013-07-30std: Remove PlatformThread spawn mode. ObsoleteBrian Anderson-18/+0
2013-07-30std: Remove ThreadPerTask spawn mode. UnimplementedBrian Anderson-2/+0
2013-07-30std: Remove ManualThreads spawn modeBrian Anderson-37/+0
2013-07-30Unkillable is not unsafe. Close #7832.Ben Blum-21/+23
2013-07-27Change concurrency primitives to standard naming conventionsSteven Stewart-Gallus-1/+1
To be more specific: `UPPERCASETYPE` was changed to `UppercaseType` `type_new` was changed to `Type::new` `type_function(value)` was changed to `value.method()`
2013-07-22new snapshotDaniel Micay-4/+0
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-7/+7
Place `pub` or `priv` on individual items instead.
2013-07-20Use Option .take() or .take_unwrap() instead of util::replace where possibleblake2-ppc-6/+5
2013-07-20Add watched and indestructible spawn modes.Ben Blum-0/+110
2013-07-20Fix linked failure tests to block forever instead of looping around yield.Ben Blum-29/+13
2013-07-20Change the HOF context switchers to pass a BlockedTask instead of a ~Task.Ben Blum-1/+2
2013-07-20Implement KillHandle::kill() and friends (unkillable, atomically). Close #6377.Ben Blum-35/+77
2013-07-18auto merge of #7856 : brson/rust/no-thread-per-core, r=pcwaltonbors-18/+0
This doesn't make sense under the new scheduler.
2013-07-11auto merge of #7677 : alexcrichton/rust/tls-gc, r=pcwaltonbors-0/+4
cc #6004 and #3273 This is a rewrite of TLS to get towards not requiring `@` when using task local storage. Most of the rewrite is straightforward, although there are two caveats: 1. Changing `local_set` to not require `@` is blocked on #7673 2. The code in `local_pop` is some of the most unsafe code I've written. A second set of eyes should definitely scrutinize it... The public-facing interface currently hasn't changed, although it will have to change because `local_data::get` cannot return `Option<T>`, nor can it return `Option<&T>` (the lifetime isn't known). This will have to be changed to be given a closure which yield `&T` (or as an Option). I didn't do this part of the api rewrite in this pull request as I figured that it could wait until when `@` is fully removed. This also doesn't deal with the issue of using something other than functions as keys, but I'm looking into using static slices (as mentioned in the issues).
2013-07-11Work around stage0 to remove '@' requirements from TLSAlex Crichton-0/+4
2013-07-09std: Remove ThreadPerCore spawn mode. UnusedBrian Anderson-18/+0
2013-07-08std: Add a yield implementation for newschedBrian Anderson-4/+19
2013-07-03Merge remote-tracking branch 'mozilla/master'Brian Anderson-12/+10
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-0/+1
of tasks as a component of coroutines.
2013-06-28librustc: Change "Owned" to "Send" everywherePatrick Walton-4/+4
2013-06-28std: silence some test warnings.Huon Wilson-8/+6
2013-06-16Merge remote-tracking branch 'brson/io'Brian Anderson-13/+2
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-13/+2
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: Tasks must have an unwinder. SimplerBrian Anderson-10/+1
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-6/+6
Part of #3853
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-11/+11