Merge pull request #1831 from reaperhulk/0.8.2-changelog

update changelog and bump version to 0.8.2
diff --git a/src/cryptography/hazmat/bindings/commoncrypto/binding.py b/src/cryptography/hazmat/bindings/commoncrypto/binding.py
index 79a1636..afb9066 100644
--- a/src/cryptography/hazmat/bindings/commoncrypto/binding.py
+++ b/src/cryptography/hazmat/bindings/commoncrypto/binding.py
@@ -4,6 +4,8 @@
 
 from __future__ import absolute_import, division, print_function
 
+import threading
+
 from cryptography.hazmat.bindings.utils import (
     build_ffi_for_binding, load_library_for_binding,
 )
@@ -35,6 +37,7 @@
         ],
     )
     lib = None
+    _init_lock = threading.Lock()
 
     def __init__(self):
         self._ensure_ffi_initialized()
@@ -44,8 +47,10 @@
         if cls.lib is not None:
             return
 
-        cls.lib = load_library_for_binding(
-            cls.ffi,
-            module_prefix=cls._module_prefix,
-            modules=cls._modules,
-        )
+        with cls._init_lock:
+            if cls.lib is None:
+                cls.lib = load_library_for_binding(
+                    cls.ffi,
+                    module_prefix=cls._module_prefix,
+                    modules=cls._modules,
+                )
diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py
index cf456e9..5ccee97 100644
--- a/src/cryptography/hazmat/bindings/openssl/binding.py
+++ b/src/cryptography/hazmat/bindings/openssl/binding.py
@@ -98,6 +98,7 @@
 
     _locks = None
     _lock_cb_handle = None
+    _init_lock = threading.Lock()
     _lock_init_lock = threading.Lock()
 
     ffi = build_ffi_for_binding(
@@ -117,14 +118,16 @@
         if cls.lib is not None:
             return
 
-        cls.lib = load_library_for_binding(
-            cls.ffi,
-            cls._module_prefix,
-            cls._modules,
-        )
+        with cls._init_lock:
+            if cls.lib is None:
+                cls.lib = load_library_for_binding(
+                    cls.ffi,
+                    cls._module_prefix,
+                    cls._modules,
+                )
 
-        res = cls.lib.Cryptography_add_osrandom_engine()
-        assert res != 0
+                res = cls.lib.Cryptography_add_osrandom_engine()
+                assert res != 0
 
     @classmethod
     def init_static_locks(cls):