Skip to content

Instantly share code, notes, and snippets.

View oremanj's full-sized avatar

Joshua Oreman oremanj

  • Hudson River Trading
  • Boulder, CO
View GitHub Profile
@oremanj
oremanj / unmarked_await.py
Created January 17, 2020 20:12
use greenlet to make sync APIs play nice with an async loop
# NB: this is untested. and also evil. but interesting?
import outcome
import trio
import types
import greenlet
from contextvars import ContextVar
landing_pad_cvar = ContextVar("landing_pad")

Keybase proof

I hereby claim:

  • I am oremanj on github.
  • I am oremanj (https://keybase.io/oremanj) on keybase.
  • I have a public key whose fingerprint is B305 E50C 2704 914E C8DB DBBC BF15 5100 20A2 CA22

To claim this, I am signing this object: