Skip to content

Instantly share code, notes, and snippets.

@wwj718
Created September 7, 2018 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wwj718/da5fd56da4f0d05a8240d82f2145a54e to your computer and use it in GitHub Desktop.
Save wwj718/da5fd56da4f0d05a8240d82f2145a54e to your computer and use it in GitHub Desktop.
There is no current event loop in thread ‘Thread-1’.
# https://blog.csdn.net/qq_34367804/article/details/75046718
# 在线程启动时调用
import asyncio
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment