Start an async function inside a new thread
问题 I'm trying to create a discord bot and I need to run an async function in another new Thread since the main Thread is required to run another function (Discord Client) What I'm trying to accomplish: # This methods needs to run in another thread async def discord_async_method(): while True: sleep(10) print("Hello World") ... # Discord Async Logic # This needs to run in the main thread client.run(TOKEN) thread = "" try: # This does not work, throws error "printHelloWorld Needs to be awaited"