X Tutup
The Wayback Machine - https://web.archive.org/web/20250608065606/https://github.com/python/cpython/issues/99704
Skip to content

asyncio: cannot schedule new futures after shutdown #99704

Closed as not planned
Closed as not planned
@noskill

Description

@noskill

I am getting this stacktrace from time to time. It appears during program shutdown.

  tcp_server.py", line 79, in __cb
    fut = self.loop.run_in_executor(None, lambda: self.onMessageReceived(data))
  File "python3.10/asyncio/base_events.py", line 818, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "python3.10/concurrent/futures/thread.py", line 167, in submit
    raise RuntimeError('cannot schedule new futures after shutdown')

Here __cb is a coroutine i pass to asyncio.start_server

I am using Python 3.10.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup