about summary refs log tree commit diff
path: root/src/libstd/rt/work_queue.rs
AgeCommit message (Collapse)AuthorLines
2013-11-29Implement a lock-free work-stealing dequeAlex Crichton-75/+0
This adds an implementation of the Chase-Lev work-stealing deque to libstd under std::rt::deque. I've been unable to break the implementation of the deque itself, and it's not super highly optimized just yet (everything uses a SeqCst memory ordering). The major snag in implementing the chase-lev deque is that the buffers used to store data internally cannot get deallocated back to the OS. In the meantime, a shared buffer pool (synchronized by a normal mutex) is used to deallocate/allocate buffers from. This is done in hope of not overcommitting too much memory. It is in theory possible to eventually free the buffers, but one must be very careful in doing so. I was unable to get some good numbers from src/test/bench tests (I don't think many of them are slamming the work queue that much), but I was able to get some good numbers from one of my own tests. In a recent rewrite of select::select(), I found that my implementation was incredibly slow due to contention on the shared work queue. Upon switching to the parallel deque, I saw the contention drop to 0 and the runtime go from 1.6s to 0.9s with the most amount of time spent in libuv awakening the schedulers (plus allocations). Closes #4877
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-4/+4
2013-07-27Change concurrency primitives to standard naming conventionsSteven Stewart-Gallus-2/+2
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-06-28librustc: Change "Owned" to "Send" everywherePatrick Walton-2/+2
2013-06-04std::cell: Modernize constructorsPhilipp Brüschweiler-1/+1
Part of #3853
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-6/+6
2013-05-29librustc: Redo the unsafe checker and make unsafe methods not callable from ↵Patrick Walton-13/+21
safe code
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+67
This only changes the directory names; it does not change the "real" metadata names.