Lawouach / WebSocket-for-Python

WebSocket client and server library for Python 2 and 3 as well as PyPy (ws4py 0.5.1)
https://ws4py.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
1.12k stars 289 forks source link

example from client tutorial doesn't work #242

Open fried-sausage opened 6 years ago

fried-sausage commented 6 years ago

When using geventclient from ws4py as shown in tutorial, it blocks and doesn't let other greenlets to run. Tutorial example: https://ws4py.readthedocs.io/en/latest/sources/clienttutorial/#gevent Test to reproduce issue: https://gist.github.com/fried-sausage/0c645be0677359d70f72024b1d7a3e9b mad_printer never gets a chance to run. The solution for me was to add gevent.monkey.patch_all(). It is never mentioned in tutorial that user should monkey patch, however.