Skip to content

Shutdown is not threadsafe on PyPy #799

@bdraco

Description

@bdraco

https://github.com/jstasiak/python-zeroconf/runs/2878499480

tests\services\test_browser.py:122: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
zeroconf\_core.py:694: in close
    self._shutdown_threads()
zeroconf\_core.py:681: in _shutdown_threads
    shutdown_loop(self.loop)
zeroconf\_utils\aio.py:81: in shutdown_loop
    pending_tasks = set(asyncio.run_coroutine_threadsafe(_get_all_tasks(loop), loop).result())
c:\hostedtoolcache\windows\pypy\3.6.12\x86\lib-python\3\concurrent\futures\_base.py:432: in result
    return self.__get_result()
c:\hostedtoolcache\windows\pypy\3.6.12\x86\lib-python\3\concurrent\futures\_base.py:384: in __get_result
    raise self._exception
c:\hostedtoolcache\windows\pypy\3.6.12\x86\lib-python\3\asyncio\tasks.py:180: in _step
    result = coro.send(None)
zeroconf\_utils\aio.py:71: in _get_all_tasks
    return list(asyncio.Task.all_tasks(loop))  # type: ignore  # pylint: disable=no-member
c:\hostedtoolcache\windows\pypy\3.6.12\x86\lib-python\3\asyncio\tasks.py:66: in all_tasks
    return {t for t in cls._all_tasks if t._loop is loop}
c:\hostedtoolcache\windows\pypy\3.6.12\x86\lib-python\3\asyncio\tasks.py:66: in <setcomp>
    return {t for t in cls._all_tasks if t._loop is loop}
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions