Skip to content

Instantly share code, notes, and snippets.

View michelp's full-sized avatar

Michel Pelletier michelp

View GitHub Profile
@michelp
michelp / wake.py
Created August 13, 2012 18:56 — forked from minrk/wake.py
Example for waking a poller in another thread by using a PUSH/PULL waker socket pair
"""
Example for waking a poller in another thread by using a PUSH/PULL waker socket pair
"""
import threading
import time
import zmq
ctx = zmq.Context()
# setup the wake machinery