zeromq/jeromq — pull request #153 by devinrsmith (2014-04-05 15:02:09+00:00)
Title: Added double checked locking for shared variable context in ZContext.

Added double checked locking for shared variable context in ZContext. ZContext.getContext() and ZContext.createSocket(...) should now be thread safe.

See https://en.wikipedia.org/wiki/Double-checked_locking / http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html for details why this is necessary in a multi threaded environment.