Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify JCTools advice #17

Open
nitsanw opened this issue Mar 11, 2020 · 1 comment
Open

Clarify JCTools advice #17

nitsanw opened this issue Mar 11, 2020 · 1 comment

Comments

@nitsanw
Copy link

nitsanw commented Mar 11, 2020

Thanks for these note! very interesting and useful
I note that the advice to use JCTools: https://github.com/code-review-checklists/java-concurrency#jctools

Was it considered to use one of the array-based queues from the JCTools library instead of ArrayBlockingQueue? Those queues from JCTools are classified as blocking, but they avoid lock acquisition in many cases and are generally much faster than ArrayBlockingQueue.

There's a nuance here that may be lost on readers in that the queues in JCTools are sometimes blocking (in the concurrency sense), but also lock-less and can allow better progress guarantees. I'm not sure this document is the place to make such fine grained explanations though, so feel free to leave as is. I would also argue that people who use ConcurrentLinkedQueue or LinkedBlockingQueue should consider the alternatives from JCTools.
In any case, thanks for the mention :-)

@leventov
Copy link
Member

I can give you write access to the repo so that you can adjust the language of JCTools item and add a new item ConcurrentLinkedQueue/LinkedBlockingQueue (or extend a JCTools item). Or you could make a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants