Skip to content

Clarify JCTools advice #17

Open
Open
@nitsanw

Description

@nitsanw

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 :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions