Skip to content

Instantly share code, notes, and snippets.

View ykrods's full-sized avatar

ykrods ykrods

  • Kanagawa, Japan
View GitHub Profile
@appeltel
appeltel / pubsub.py
Last active July 13, 2024 17:35
asyncio pubsub example
import asyncio
import random
class Hub():
def __init__(self):
self.subscriptions = set()
def publish(self, message):