Skip to content

Instantly share code, notes, and snippets.

View michaelosthege's full-sized avatar

Michael Osthege michaelosthege

View GitHub Profile
@drgarcia1986
drgarcia1986 / blocking_to_async.py
Last active November 13, 2016 15:24
Calling a blocking task asynchronously in Tornado with ThreadPoolExecutor
# -*- coding: utf-8 -*-
import time
import concurrent.futures
import tornado.web
import tornado.gen
import tornado.httpserver
import tornado.ioloop