Skip to content

Instantly share code, notes, and snippets.

View liuchang0812's full-sized avatar

Chang Liu liuchang0812

  • Wechat
  • Shenzhen
View GitHub Profile
import sys
import gevent
from gevent.monkey import patch_all; patch_all()
from gevent import server, event, socket
from multiprocessing import Process, current_process, cpu_count
"""
Simple multiprocess StreamServer that proxies messages between clients.
Avoids using a multiprocessing.Event since it blocks on a semaphore.