You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to use qPython with asyncio without resorting to things like run_in_executor (i.e. ThreadPoolExecutor)? Both synchronous sync and asynchronous receive calls are blocking, making it impossible to use with asyncio (without running in a separate thread).
Ideally, I would like to do something like the following. Note that I've made up methods sync_async (yeah, not a good name) and receive_async:
Another related problem I currently face is that all socket reads are blocking, which makes my program very slow (I want to read multiple large results concurrently). I'm not certain of technical details, but it seems like it should be possible to do non-blocking concurrent socket I/O (e.g. asyncore seems like it does the job?).
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
Is it possible to use
qPython
withasyncio
without resorting to things likerun_in_executor
(i.e.ThreadPoolExecutor
)? Both synchronoussync
and asynchronousreceive
calls are blocking, making it impossible to use withasyncio
(without running in a separate thread).Ideally, I would like to do something like the following. Note that I've made up methods
sync_async
(yeah, not a good name) andreceive_async
:and/or
In fact, there'd be no need in two methods (?) - we just need a method returning a future which we could
await
:Another related problem I currently face is that all socket reads are blocking, which makes my program very slow (I want to read multiple large results concurrently). I'm not certain of technical details, but it seems like it should be possible to do non-blocking concurrent socket I/O (e.g. asyncore seems like it does the job?).
Thanks!
The text was updated successfully, but these errors were encountered: