<NME> signals.py
<BEF> """Custom signals."""

import django.dispatch

request_accessor = django.dispatch.Signal()


def get_request():
    """Get the current request from anywhere."""
    request = request_accessor.send(None)
    if request:
        return request[0][1]
    return None
    return _local_store.request

<MSG> Make sure signal is not shared between threads.

see #1015

<DFF> @@ -1,13 +1,16 @@
 """Custom signals."""
 
+from threading import local
+
 import django.dispatch
 
-request_accessor = django.dispatch.Signal()
+request_accessor = local()
+request_accessor.signal = django.dispatch.Signal()
 
 
 def get_request():
     """Get the current request from anywhere."""
-    request = request_accessor.send(None)
+    request = request_accessor.signal.send(None)
     if request:
         return request[0][1]
     return None

Make sure signal is not shared between threads.