mesosphere/marathon — pull request #259 by drexin (2014-05-01 11:32:09+00:00)
Title: #108 Fix concurrent updates

This PR adds a weak cache to `MarathonStore` that maps from the application key to a `Semaphore`. This ensures that only one thread can modify a given application at a time. The weak references on the values ensures that the entries are being removed from the cache when not needed to prevent memory leaks. If for a given key no `Semaphore` is currently in the cache, one will be created by the `CacheLoader`.