Thread e asyncio: a tarefa foi destruída, mas está pendente

Eu tenho um segmento que executa um loop assíncio. Inicio uma tarefa futura que faz coisas irrelevantes aqui. Quando paro o encadeamento, também paro o loop assíncrono. No entanto, não consigo cancelar a tarefa de pool e obterTask was destroyed but it is pending!

Aqui está um exemplo de brinquedo:

from contextlib import suppress
from threading import Thread
from time import sleep
import asyncio


class Hardware(Thread):

    def __init__(self, *args, **kwargs):
        super(Hardware, self).__init__(*args, **kwargs)
        self.loop = None
        self._poll_task = None

    def run(self):
        self.loop = asyncio.new_event_loop()
        asyncio.set_event_loop(self.loop)
        self.loop.create_task(self._poll())
        self.loop.run_forever()

    async def _poll(self):
        print('ook')
        await asyncio.sleep(1.0)
        self._poll_task = asyncio.ensure_future(self._poll())
        return self._poll_task

    def stop(self):
        if self._poll_task is not None:
            self.loop.call_soon_threadsafe(self._poll_task.cancel)
        with suppress(asyncio.CancelledError):
            self.loop.call_soon_threadsafe(self.loop.stop)


hw = Hardware()
try:
    hw.start()
    while True:
        sleep(.1)
except KeyboardInterrupt:
    hw.stop()
    hw.join()

Em execução, ele produz:

; python ook.py
ook
ook
^CTask was destroyed but it is pending!
task: <Task pending coro=<Hardware._poll() running at ook.py:22> wait_for=<Future cancelled>>  

O que estou fazendo errado?

questionAnswers(1)

yourAnswerToTheQuestion