Using a thread pool is the right answer. There's some discussion here:
https://github.com/python-trio/trio/issues/20

One thing Python could do to make this more effective would be to add
a "buffer-only" mode for operations on file objects:
https://bugs.python.org/issue32561

-n

On Sat, Jun 9, 2018 at 1:00 AM, Dima Tisnek <dim...@gmail.com> wrote:
> Hi group,
>
> It seems that Python docs don't make a recommendation about which library to
> use for asynchronous access to files when using asyncio.
>
> Is there a canonical recommendation?
> Is it a good idea?
>
> There's at least one 3rd party library popular enough to deserve own
> stackoverflow tag, however AFAIU it uses thread pool, while most OS'es
> provide some or other API, making native implementation possible, at least
> in theory.
>
> What are your thoughts?
>
> Thanks,
> Dima
>
> _______________________________________________
> Async-sig mailing list
> Async-sig@python.org
> https://mail.python.org/mailman/listinfo/async-sig
> Code of Conduct: https://www.python.org/psf/codeofconduct/
>



-- 
Nathaniel J. Smith -- https://vorpus.org
_______________________________________________
Async-sig mailing list
Async-sig@python.org
https://mail.python.org/mailman/listinfo/async-sig
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to