summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-07-20auto merge of #7894 : pcwalton/rust/and-pointers-in-at-boxes, r=brsonbors-5/+5
r? @brson
2013-07-20str: Implement Container for ~str, @str and Mutable for ~strblake2-ppc-1/+51
~str and @str need separate implementations for use in generic functions, where it will not automatically use the impl on &str.
2013-07-20option: Add .chain_mut_ref()blake2-ppc-0/+11
.chain_mut_ref() is the mutable alternative to .chain_ref(). A use case example for this method is extraction of an optional value from an Option<Container> value.
2013-07-20option: Title-case `Some` and `None` in docs and fail messagesblake2-ppc-12/+12
For accuracy, say 'get_ref None' instead of 'get_ref none', and so on.
2013-07-20auto merge of #7858 : bblum/rust/kill, r=brsonbors-1157/+1840
Some notes about the commits. Exit code propagation commits: * ```Reimplement unwrap()``` has the same old code from ```arc::unwrap``` ported to use modern atomic types and finally (it's considerably nicer this way) * ```Add try_unwrap()``` has some new slightly-tricky (but pretty simple) concurrency primitive code * ```Add KillHandle``` and ```Add kill::Death``` are the bulk of the logic. Task killing commits: * ```Implement KillHandle::kill() and friends```, ```Do a task-killed check```, and ```Add BlockedTask``` implement the killing logic; * ```Change the HOF context switchers``` turns said logic on Linked failure commits: * ```Replace *rust_task ptrs``` adapts the taskgroup code to work for both runtimes * ```Enable taskgroup code``` does what it says on the tin. r? @brson
2013-07-20auto merge of #7419 : catamorphism/rust/default-package, r=graydonbors-1/+41
r? @brson `rustpkg build`, if executed in a package source directory inside a workspace, will now build that package. By "inside a workspace" I mean that the parent directory has to be called `src`, and rustpkg will create a `build` directory in .. if there isn't already one. Same goes for `rustpkg install` and `rustpkg clean`. For the time being, `rustpkg build` (etc.) will still error out if you run it inside a directory whose parent isn't called `src`. I'm not sure whether or not it's desirable to have it do something in a non-workspace directory.
2013-07-20Use Option .take() or .take_unwrap() instead of util::replace where possibleblake2-ppc-36/+25
2013-07-20Fix warnings in stdtest and extratest. Maybe somebody will care.Ben Blum-1/+0
2013-07-20Add watched and indestructible spawn modes.Ben Blum-4/+121
2013-07-20Rename TCB to TaskgroupBen Blum-15/+16
2013-07-20Enable taskgroup code for newsched spawns.Ben Blum-5/+36
2013-07-20Fix linked failure tests to block forever instead of looping around yield.Ben Blum-29/+13
2013-07-20(cleanup) impl TaskSetBen Blum-39/+46
2013-07-20(cleanup) Don't check taskgroup generation monotonicity unless cfg(test).Ben Blum-16/+16
2013-07-20(cleanup) Modernize taskgroup code for the new borrow-checker.Ben Blum-61/+20
2013-07-20Replace *rust_task ptrs in taskgroup code with TaskHandle, for transitioning ↵Ben Blum-128/+219
to newsched killing.
2013-07-20Add option::take(), the building block of the option::take_* family.Ben Blum-3/+9
2013-07-20Stash a spare kill flag inside tasks, to save two atomic xadds in the ↵Ben Blum-37/+87
blocking fastpath.
2013-07-20Add tests for task killing and blocking.Ben Blum-0/+140
2013-07-20Add test::with_test_task() convenience function.Ben Blum-1/+11
2013-07-20Change the HOF context switchers to pass a BlockedTask instead of a ~Task.Ben Blum-60/+102
2013-07-20Add BlockedTask (wake, try_block, etc) in kill.rs.Ben Blum-2/+95
2013-07-20Do a task-killed check at the start of task 'timeslices'.Ben Blum-1/+38
2013-07-20Implement KillHandle::kill() and friends (unkillable, atomically). Close #6377.Ben Blum-37/+227
2013-07-20Add tests for KillHandleBen Blum-0/+140
2013-07-20Remove join_latchBen Blum-654/+0
2013-07-20Add kill::Death for task death services and use it in Task.Ben Blum-22/+79
2013-07-20Add KillHandle and implement exit code propagation to replace join_latchBen Blum-3/+134
2013-07-20Add UnsafeAtomicRcBox::try_unwrap()Ben Blum-1/+68
2013-07-20Reimplement ARC::unwrap() and friends.Ben Blum-19/+211
2013-07-20Add AtomicOption::fill() and AtomicOption::is_empty()Ben Blum-0/+38
2013-07-20Remove redundant Atomic{Ui,I}nt types from unstable::syncBen Blum-68/+0
2013-07-20Add Option::take_map{,_default}()Ben Blum-0/+14
2013-07-20Add Either::expect_{left,right}Ben Blum-6/+26
2013-07-20auto merge of #7855 : brson/rust/rt-overcommit, r=pcwaltonbors-5/+4
Too much overcommit here exhausts the low fd limit on OS X.
2013-07-19std: Remove old magic core modBrian Anderson-42/+32
2013-07-19iterator: impl DoubleEndedIterator for adaptorsDaniel Micay-0/+121
2013-07-19std::rt: Remove an obsolete FIXME. #7757Brian Anderson-5/+0
2013-07-19std::rt: Use a constant 4 threads for multithreaded sched tests. #7772Brian Anderson-5/+4
Too much overcommit here exhausts the low fd limit on OS X.
2013-07-19Missed the methods of UdpWatcher.Eric Reed-18/+16
2013-07-19Changed methods on UDP sockets and TCP/UDP watchers to &mut self to reflect ↵Eric Reed-64/+65
that libuv may change the underlying handle.
2013-07-18auto merge of #7857 : blake2-ppc/rust/fix-test-warnings, r=alexcrichtonbors-9/+8
Fix warnings that only show up when compiling the tests for libstd, libextra and one in librusti. Only trivial changes.
2013-07-18auto merge of #7856 : brson/rust/no-thread-per-core, r=pcwaltonbors-21/+1
This doesn't make sense under the new scheduler.
2013-07-18rustpkg: Make rustpkg commands work without a package IDTim Chevalier-1/+41
`rustpkg build`, if executed in a package source directory inside a workspace, will now build that package. By "inside a workspace" I mean that the parent directory has to be called `src`, and rustpkg will create a `build` directory in .. if there isn't already one. Same goes for `rustpkg install` and `rustpkg clean`. For the time being, `rustpkg build` (etc.) will still error out if you run it inside a directory whose parent isn't called `src`. I'm not sure whether or not it's desirable to have it do something in a non-workspace directory.
2013-07-18auto merge of #7854 : brson/rust/rt-test-threads, r=pcwaltonbors-1/+1
2013-07-18librustc: Forbid `&` pointers (other than `&'static`) inside `@` boxes.Patrick Walton-5/+5
This makes custom borrowing implementations for custom smart pointers sound.
2013-07-18auto merge of #7833 : blake2-ppc/rust/hashmap-consume, r=alexcrichtonbors-65/+21
Updated all users of HashMap, HashSet ::consume() to use .consume_iter(). Since .consume_iter() takes the map or set by value, it needs awkward extra code to in librusti's use of @mut HashMap, where the map value can not be directly moved out. Addresses issue #7719
2013-07-18auto merge of #7842 : thestinger/rust/closure, r=huonwbors-37/+24
2013-07-18hashmap: Remove .consume() has rename .consume_iter() to .consume()blake2-ppc-65/+21
Updated all users of HashMap, HashSet old .consume() to use .consume() with a for loop. Since .consume() takes the map or set by value, it needs awkward extra code to in librusti's use of @mut HashMap, where the map value can not be directly moved out.
2013-07-18repr: add a test case for @mut inside another typeDaniel Micay-2/+2