Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Problem with ringbuffer.readManyAsync and minSize is 0 #6787
I'm a bit stumped by the non-blocking behaviour of readManyAsync method (Hazelcast 3.5).
If I want a non-blocking call (minCount = 0) :
ReadResultSet rs = rb.readManyAsync(sequence, 0, 10, null).get();
the ReadResultSet NEVER returns anything.
If I make the readManyAsync call blocking with a minCount > 0, then it works fine.
ReadResultSet rs = rb.readManyAsync(sequence, 1, 10, null).get();
(If I want an interruptible thread, I can also add a timeout on the get, it works fine too) :
ReadResultSet rs = rb.readManyAsync(seq.get(), 1, 10, null).get(500, TimeUnit.MILLISECONDS);
But if I specify a minCount of 0, it never reads anything.
I attach a minimal test case, but really wondering what I'm missing here, any help appreciated :-)