File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ def _sync_to_async_non_bridge(
158158 Error trying to create a new async loop - to be able to call 'sync_to_async' from
159159 code inside a running async loop, the parent 'sync execution branch' must be called
160160 with `extraasync.async_to_sync`.
161- """
161+ """
162162 )
163163 )
164164 _non_bridge_loop .set (loop )
@@ -222,8 +222,8 @@ def __repr__(self):
222222
223223
224224def _in_context_sync_worker (sync_task : _SyncTask ):
225-
226225 _context_bound_task .set (sync_task )
226+ result = None
227227 try :
228228 logger .debug ("Entering sync call in worker thread" )
229229 result = sync_task .sync_task (* sync_task .args , ** sync_task .kwargs )
@@ -284,7 +284,6 @@ def async_to_sync(
284284 Returns a future that will contain the results of the synchronous call
285285 """
286286 logger .debug ("Starting async_to_sync call to %s" , func )
287-
288287 if kwargs is None :
289288 kwargs = {}
290289
You can’t perform that action at this time.
0 commit comments