Created
January 7, 2023 12:20
-
-
Save kalkin/326c5b9408e31ba4e45a7ad633cb57c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
# Start the slixmpp Client | |
client = slixmpp.Client() | |
client.start() | |
# Define a new async function | |
async def my_async_function(): | |
# Perform some asynchronous task here | |
await asyncio.sleep(1) | |
print('Hello from my_async_function!') | |
# Schedule the async function to be run concurrently with the slixmpp Client | |
asyncio.ensure_future(my_async_function()) | |
# Run the event loop indefinitely | |
asyncio.get_event_loop().run_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment