Closed BrenBarn closed 2 years ago
Thanks for reporting @BrenBarn.
Indeed, this cannot work. Rather than wrapping in run_sync
, we could make _stdin_hook_default
an async function, and support both async and sync stdin_hook. What do you think?
Having support for either sync or async stdin_hook
would be great. I don't have much of an opinion on whether _stdin_hook_default
should be sync or async, although I suppose making it async makes sense as it is called by an async function and calls async functions itself.
See this line.
msg_ready
is now async, so its return value can't be treated as a boolean anymore. I suppose it needs to be wrapped inrun_sync
.