kinghajj / deque Goto Github PK
View Code? Open in Web Editor NEWA (mostly) lock-free concurrent work-stealing deque in Rust.
License: Other
A (mostly) lock-free concurrent work-stealing deque in Rust.
License: Other
Hi! The version on crates.io of deque doesn't compile on the current nightly, but the version on github does.
It would be great if you could make a new release :)
Would be great to have it :)
An initial benchmark using coio-rs, which uses this crate to implement work stealing coroutine scheduling, suggests that using acquire/release ordering instead of sequential-consistent improves performance of this deque by up to 700% and overall performance of coio by about 3%, even though deque should play such a small part of the rest of the program (using OS X 10.11, i7 3770).
I'd be willing to create a PR based on this gist: https://gist.github.com/Amanieu/7347121 which in turn is based on this paper: http://www.di.ens.fr/~zappa/readings/ppopp13.pdf if you'd be ok with merging my changes and pushing a new version to crate. ๐
Hi,
I didn't read the C11 implementation that the last version was based on, so maybe I'm wrong here.
Previously I could clone a Stealer<T>
even when T
was not implementing Clone
. With 0.3.0 I can't do that. Is this intentional or a bug? I need to be able to clone my Stealer
s for deques where the content can't be cloned.
src/workerthread.rs:73:22: 73:29 error: no method named `clone` found for type `deque::Stealer<Task<Arg, Ret>>` in the current scope
src/workerthread.rs:73 self.stealer.clone()
^~~~~~~
src/workerthread.rs:73:22: 73:29 note: the method `clone` exists but the following trait bounds were not satisfied: `Task<Arg, Ret> : core::clone::Clone`
I can submit a PR with a fix if it's a bug. If it's intended I would like to know why this has changed. Thanks.
Ping @Amanieu
This may be obvious, but it would be nice to have an assertion on this.
Creating pull request to fix this as well.
Intial size of deque is 32 but I guess there is no case handled for buffer size to increase above a certain threshold?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.