Commit Graph

20288 Commits

Author SHA1 Message Date
bors
ec53efa64d auto merge of #7884 : pcwalton/rust/check-loans-and-inside-at, r=graydon
r? @graydon
2013-07-20 05:43:38 -07:00
bors
e3142c5d3e auto merge of #7858 : bblum/rust/kill, r=brson
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-20 03:55:39 -07:00
bors
fdbd56ca38 auto merge of #7419 : catamorphism/rust/default-package, r=graydon
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-20 02:16:41 -07:00
blake2-ppc
980646a450 Use Option .take() or .take_unwrap() instead of util::replace where possible 2013-07-20 05:12:05 -04:00
Ben Blum
621bc79d0d Fix warnings in stdtest and extratest. Maybe somebody will care. 2013-07-20 05:12:05 -04:00
Ben Blum
4bcda7148d Fix warnings in src/test/bench tests. Nobody will ever care. 2013-07-20 05:12:04 -04:00
Ben Blum
7ad7911222 Add watched and indestructible spawn modes. 2013-07-20 05:12:04 -04:00
Ben Blum
2183145850 Rename TCB to Taskgroup 2013-07-20 05:12:04 -04:00
Ben Blum
f3c79c4026 Enable taskgroup code for newsched spawns. 2013-07-20 05:12:03 -04:00
Ben Blum
0e1be5ff9e Fix linked failure tests to block forever instead of looping around yield. 2013-07-20 05:08:58 -04:00
Ben Blum
728edb5af6 (cleanup) impl TaskSet 2013-07-20 05:08:58 -04:00
Ben Blum
6d9184609a (cleanup) Don't check taskgroup generation monotonicity unless cfg(test). 2013-07-20 05:08:58 -04:00
Ben Blum
87bbcb579a (cleanup) Modernize taskgroup code for the new borrow-checker. 2013-07-20 05:08:58 -04:00
Ben Blum
9bbec651df Replace *rust_task ptrs in taskgroup code with TaskHandle, for transitioning to newsched killing. 2013-07-20 05:08:57 -04:00
Ben Blum
e2a42416dd Add option::take(), the building block of the option::take_* family. 2013-07-20 05:08:57 -04:00
Ben Blum
2a7273c71e Stash a spare kill flag inside tasks, to save two atomic xadds in the blocking fastpath. 2013-07-20 05:08:57 -04:00
Ben Blum
e283c4ddff Add tests for task killing and blocking. 2013-07-20 05:08:57 -04:00
Ben Blum
a093b5434a Add test::with_test_task() convenience function. 2013-07-20 05:08:57 -04:00
Ben Blum
9ad1997549 Change the HOF context switchers to pass a BlockedTask instead of a ~Task. 2013-07-20 05:08:57 -04:00
Ben Blum
0101f35f27 Add BlockedTask (wake, try_block, etc) in kill.rs. 2013-07-20 05:08:57 -04:00
Ben Blum
e80efe3fda Do a task-killed check at the start of task 'timeslices'. 2013-07-20 05:08:56 -04:00
Ben Blum
629f6e8d68 Implement KillHandle::kill() and friends (unkillable, atomically). Close #6377. 2013-07-20 05:08:56 -04:00
Ben Blum
2a99320583 Add tests for KillHandle 2013-07-20 05:08:56 -04:00
Ben Blum
afc199bea0 Remove join_latch 2013-07-20 05:08:56 -04:00
Ben Blum
6882508b6f Add kill::Death for task death services and use it in Task. 2013-07-20 05:08:56 -04:00
Ben Blum
52ca256d7b Add KillHandle and implement exit code propagation to replace join_latch 2013-07-20 05:08:56 -04:00
Ben Blum
2a99163f5d Add UnsafeAtomicRcBox::try_unwrap() 2013-07-20 05:08:55 -04:00
Ben Blum
10a400ffaa Reimplement ARC::unwrap() and friends. 2013-07-20 05:08:55 -04:00
Ben Blum
55adc4467b Add AtomicOption::fill() and AtomicOption::is_empty() 2013-07-20 05:08:55 -04:00
Ben Blum
28c9ba91d8 Remove redundant Atomic{Ui,I}nt types from unstable::sync 2013-07-20 05:08:55 -04:00
Ben Blum
5a9b33a76d Add Option::take_map{,_default}() 2013-07-20 05:08:55 -04:00
Ben Blum
96c1082f0f Add Either::expect_{left,right} 2013-07-20 05:08:55 -04:00
Michael Woerister
a1303cc815 debuginfo: Removed some test relying on data structure sizes hard to predict for all possible platforms and configurations. 2013-07-20 10:47:24 +02:00
bors
098709aa63 auto merge of #7855 : brson/rust/rt-overcommit, r=pcwalton
Too much overcommit here exhausts the low fd limit on OS X.
2013-07-20 00:37:42 -07:00
Daniel Micay
8d97c905dd Merge pull request #7897 from thestinger/double
rollup of small pull requests

404de4f r=huonw
0cdb0a2 r=pcwalton
b082302 r=sanxiyn
b6a0138 r=huonw
8d64fa3 r=graydon
ddd8c15 r=thestinger
eb74f0c r=thestinger
2013-07-19 20:25:46 -07:00
Alex Crichton
0bba8f4b74 Add tests for issues which can be closed
Closes #5275, $4547
2013-07-19 19:01:46 -07:00
Matthijs Hofstra
eb74f0ccf6 Added a new method to extra::future (unwrap) + a test 2013-07-19 21:04:33 -04:00
Brian Anderson
ddd8c156c6 std: Remove old magic core mod 2013-07-19 21:01:24 -04:00
Jack Moffitt
8d64fa3288 Reorganize README to make it more clear.
This also adds a note about required memory usage and instructions for
building from Git.
2013-07-19 20:52:16 -04:00
Felix S. Klock II
b6a0138f97 PR #7637 followup: no need to print the set of removed files twice. 2013-07-19 20:47:00 -04:00
maikklein
b082302727 updated manual 2013-07-19 20:43:04 -04:00
Daniel Micay
0cdb0a2189 remove dead take glue code paths
Closes #7888
2013-07-19 20:37:43 -04:00
Daniel Micay
404de4f4ae iterator: impl DoubleEndedIterator for adaptors 2013-07-19 20:37:37 -04:00
Andreas Martens
51649b763e smallint{map,set}: replace iterators with DoubleEndedIterator
Also changed the tests to iterate over sparse maps/sets.
2013-07-20 02:29:54 +02:00
Brian Anderson
79677f0556 mk: Remove CFG_INSTALL_SNAP logic. #2664 2013-07-19 15:35:42 -07:00
Graydon Hoare
0ba6a51f32 extra: add some microbenchmarks 2013-07-19 15:08:42 -07:00
Brian Anderson
73fccf3e70 std::rt: Remove an obsolete FIXME. #7757 2013-07-19 14:36:05 -07:00
Brian Anderson
49b72bdd77 std::rt: Use a constant 4 threads for multithreaded sched tests. #7772
Too much overcommit here exhausts the low fd limit on OS X.
2013-07-19 14:18:50 -07:00
Eric Reed
b03f1e7357 Missed the methods of UdpWatcher. 2013-07-19 13:04:03 -07:00
Eric Reed
968f7f5d3d Changed methods on UDP sockets and TCP/UDP watchers to &mut self to reflect that libuv may change the underlying handle. 2013-07-19 13:04:03 -07:00