Skip to content

Instantly share code, notes, and snippets.

View hmanity's full-sized avatar
💭
I may be slow to respond.

kirill nikitin hmanity

💭
I may be slow to respond.
View GitHub Profile
@rcarmo
rcarmo / aiohttp-server.py
Created February 25, 2017 22:04 — forked from gdamjan/aiohttp-server.py
Example: asyncio and aiohttp, handling longpoll, eventsource and websocket requests with a queue and background workers
from aiohttp import web
from threading import Thread
import asyncio
import time, uuid
loop = asyncio.get_event_loop()
def long_blocking_thing(sleep):
time.sleep(sleep)
return 42