A solution to the Santa Claus concurrency problem in Java