[concurrency-interest] (no subject)

David Stuebe davidstuebe at upserve.com
Mon Aug 6 10:10:33 EDT 2018

Hey folks

Attempted to post this last week while I was joining the list. I think it
bounced. Please ignore if it is a repeat. I have not seen any responses and
I am sad.

I found some great discussion of a previous issue* with nested
Stream.parallel operations here and hoping I might find some answers to a
related question.
* http://cs.oswego.edu/pipermail/concurrency-interest/2014-May/012652.html

I am using a ConcurrentHashMap.compute operation in an outer
Stream.parallel forEach operation. A library used in the compute method
also uses Stream.parallel.

I have written a test that illustrates the issue and explores different
implementations in 215 lines of code.

The code deadlocks with the following stack trace:

I do not understand why line 87 (the compute block) appears to be called
recursively leading to deadlock when I use Stream.parallel for the outer


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20180806/543a8fb9/attachment.html>

More information about the Concurrency-interest mailing list