Skip to content

Commit 7c886b7

Browse files
Check that cothread isn't passed an async function
1 parent ca904f6 commit 7c886b7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

softioc/cothread_dispatcher.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,7 @@ def wrapper():
3838
if completion:
3939
completion(*completion_args)
4040

41+
assert not inspect.iscoroutinefunction(func)
42+
assert not inspect.iscoroutinefunction(completion)
43+
4144
self.__dispatcher(wrapper)

0 commit comments

Comments
 (0)