Skip to content

Commit c8085b0

Browse files
Add warning about deadlocks if calling call_async_task from eventloop
1 parent fef4f5f commit c8085b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/labthings_fastapi/thing_server_interface.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ def call_async_task(
116116
block the current thread while it calls the provided async function in the
117117
server's event loop.
118118
119+
Do not call this from the event loop or it may lead to a deadlock.
120+
119121
:param async_function: the asynchronous function to call.
120122
:param \*args: positional arguments to be provided to the function.
121123

0 commit comments

Comments
 (0)