ggp-org/ggp-base — pull request #56 by AlexLandau (2014-04-21 02:58:47+00:00)
Title: Make sure new cache in AimaProver is thread-safe.

Previously, ProverCaches only had to exist on a single thread over the
lifetime of one call to the AimaProver. Now we need to ensure that the
longer-lived cache for constant values is thread-safe when accessed and
modified by multiple threads.

A ConcurrentHashMap provides thread-safety with relatively little
overhead. Note that computations for the same query on different threads
will return the same result, so we don't need to worry about dealing
with that.