Skip to content

Instantly share code, notes, and snippets.

@fxthomas
fxthomas / pw-easylink
Last active March 22, 2024 21:19
Small tool to configure and maintain PipeWire links between sets of input/output port querie
@dmfigol
dmfigol / asyncio_loop_in_thread.py
Last active April 21, 2024 17:32
Python asyncio event loop in a separate thread
"""
This gist shows how to run asyncio loop in a separate thread.
It could be useful if you want to mix sync and async code together.
Python 3.7+
"""
import asyncio
from datetime import datetime
from threading import Thread
from typing import Tuple, List, Iterable