Skip to content

Commit

Permalink
Apparently asyncio.set_event_loop() isn't necessary.
Browse files Browse the repository at this point in the history
I think this is because we never start a task from inside this worker thread. Tasks are always given to the worker thread from outside of it.
  • Loading branch information
SyntaxColoring committed Apr 27, 2023
1 parent f360bc5 commit 15c4918
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/tests/opentrons/async_object_to_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _in_thread() -> None:
# so we will always reach this point to unblock the parent thread.
loop_queue.put(loop)

asyncio.set_event_loop(loop)
asyncio.set_event_loop(loop) # Apparently this isn't necessary????
loop.run_forever()

# If we've reached here, the loop has been stopped from outside this thread. Clean it up.
Expand Down

0 comments on commit 15c4918

Please sign in to comment.