On Wed, Nov 29, 2017 at 5:03 AM, Marko Rauhamaa <ma...@pacujo.net> wrote: > Chris Angelico <ros...@gmail.com>: > >> On Wed, Nov 29, 2017 at 4:22 AM, Marko Rauhamaa <ma...@pacujo.net> wrote: >>> I have solved the gethostbyname() problem by implementing the DNS >>> protocol myself (in Python). >> >> Do you respect /etc/nsswitch.conf? > > No, but I don't need to.
Ah, right. Until the day you're wrestling with "why doesn't /etc/hosts apply to this program". Yep, you totally don't need nsswitch. >>>> I don't understand why you keep insisting that asyncio and threads >>>> are somehow incompatible, >>> >>> Where did I say that? >> >> You talk about them as if they're fundamentally different. > > In this discussion I was referring to the fact that you can interrupt a > coroutine while that is generally not possible to do to a blocking > thread. I'm not sure what you mean by a "blocking thread". Whether it's a coroutine or not, you can't interrupt gethostbyname(); and whether it's a coroutine or not, you CAN interrupt any syscall that responds to signals (that's the whole point of EINTR). ChrisA -- https://mail.python.org/mailman/listinfo/python-list