Comments (4)
Most data structures provide a fail fast variant that do not block while performing insertion (not even compare and set retries). It is what you mean?
See
While others still provide waitFree (bounded to population) alternatives (but still to be demonstrated), see xadd mpmc/mpsc xadd q offers.
from jctools.
Just a couple of questions if you don't mind @franz1981 :
- Instead of blocking, a write might fail and optionally be reattempted? Can potential failure be avoided somehow?
- Would
MpscArrayQueue
for example achieve O(1) insertions and never block write access?
I'm not familiar at all with JCTools, so thank you for your patience :)
from jctools.
- Yep, by using the mentioned fail fast variant
- Same as 1
from jctools.
@franz1981, how is failure avoided entirely, sorry? Do you mean that with retries, failure can eventually be avoided?
from jctools.
Related Issues (20)
- Publish test jar as part of the release
- any plans on fitting virtual threads HOT 1
- Missing `Automatic-Module-Name` in 4.0.1 (regression) HOT 2
- Add a parallel `forEach()` method in `NonBlockingHashMap` HOT 2
- Counters probe can be negative (and shouldn't?) HOT 3
- Add copyright information HOT 1
- MpscBlockingConsumerArrayQueue need override clear() method to avoid blocking when queue is empty HOT 2
- NonBlockingHashMap's computeIfAbsentc has a bug in a multithreaded environment HOT 11
- about spmc broadcast problem HOT 2
- the way of MpscBlockingConsumerArrayQueue provide offerFirst? HOT 1
- BaseMpscLinkedArrayQueue.peek() causes 100% CPU util [problem in caller code] HOT 2
- (cIndex - pIndex) / 2 == 0 return null;If it is being expanded, wait a little while for the expansion to succeed, there will be a JUMP, and should not return null HOT 5
- Question: "Emulating" Guava's Queues.drain on SpscLinkedQueue HOT 3
- New release to include JPMS module changes
- src/main/java/org/jctools/maps/NonBlockingHashMap.java:1415: error: missing reference label HOT 2
- Maven central 4.0.2 jar is compiled to Java 8, no longer supporting java 7 HOT 2
- unexpected MpscBlockingConsumerArrayQueue polling timeout behavior
- Unpadded variants could avoid using Unsafe HOT 3
- a question about mspc buffer array index HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jctools.