[concurrency-interest] santa clause problem solved?

Joe Bowbeer joe.bowbeer at gmail.com
Mon Apr 7 16:10:59 EDT 2008

Does anyone have a nice solution to the Santa Claus Problem using

I know this is 1/4 turn out of season, but as we all know, Java
concurrency is not "real-time" ...

In Ch. 24 of Beautiful Code, Simon Peyton Jones solves the Santa Claus
Problem in Haskell using Software Transactional Memory (STM).  The
full source of his solution can be found at:


There's also a full discussion of a "correct" Ada solution in this
article Mordechai Ben-Ari:


Ben-Ari, who wrote that Doug Lea invited the readers of Concurrent
Programming in Java to develop a full solution, also presents the
beginnings of a solution written in ancient BJUC Java.

To my eye, a solution in jCSP would look similar to the Haskell and
Erlang solutions.

Has someone written a clean solution with java.util.concurrent?  I'm
thinking a custom AbstractQueuedSynchronizer (AQS) may be involved.


More information about the Concurrency-interest mailing list