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

Add a wait-free intrusive stack data structure #312

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

chrisvest
Copy link

The WFIStack is added to the set of experimental data structures.
This data structure has, from experience, proven useful for implementing a number of other concurrency primitives.

Let me know if this is interesting.

The WFIStack is added to the set of experimental data structures.
This data structure has, from experience, proven useful for implementing a number of other concurrency primitives.
@coveralls
Copy link

coveralls commented Jun 19, 2020

Pull Request Test Coverage Report for Build 698

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 19 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.2%) to 86.054%

Files with Coverage Reduction New Missed Lines %
jctools-core/src/main/java/org/jctools/maps/NonBlockingHashMapLong.java 2 80.65%
jctools-core/src/main/java/org/jctools/maps/NonBlockingSetInt.java 3 77.65%
jctools-core/src/main/java/org/jctools/maps/NonBlockingHashMap.java 4 79.48%
jctools-core/src/main/java/org/jctools/maps/NonBlockingIdentityHashMap.java 10 75.31%
Totals Coverage Status
Change from base Build 681: -0.2%
Covered Lines: 4770
Relevant Lines: 5543

💛 - Coveralls

Copy link
Collaborator

@franz1981 franz1981 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very happy about this: probably will give another round but it looks good to me. I'm not here in charge to decide but after a thinking time into the experimental parking area I suppose this could be nice addition to the JCTools core family :)
Well done and hi :)

@nitsanw
Copy link
Contributor

nitsanw commented Jun 20, 2020

Thanks @chrisvest ! this is interesting, I'll have a close read next week :-)

- Remove `Thread.yield()` call in spin-wait loop.
- Add padding around the `WFIStack.head` field.
- Add a push/pop concurrent stress/sanity test for WFIStack.
@chrisvest
Copy link
Author

Currently working on adding a benchmark.

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

Successfully merging this pull request may close these issues.

None yet

4 participants