How to shut down a TCPServer serve_forever() loop?

Marko Rauhamaa marko at pacujo.net
Tue Nov 28 13:03:50 EST 2017


Chris Angelico <rosuav at gmail.com>:

> On Wed, Nov 29, 2017 at 4:22 AM, Marko Rauhamaa <marko at 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.

>>> 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.


Marko



More information about the Python-list mailing list