Created
April 18, 2020 21:46
-
-
Save susmithagudapati/2656e09f58dfc9dac7b2bc0cdd7cb14f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from asgiref.sync import sync_to_async | |
async_function = sync_to_async(sync_function) | |
async_function = sync_to_async(sensitive_sync_function, thread_sensitive=True) | |
@sync_to_async | |
def sync_function(...): | |
... | |
@sync_to_async(thread_sensitive=True) | |
def sensitive_sync_function(...): | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment