Currently greenify only supports ELF format modules, and is tested on Linux.
Install from source
greenify module is installed using setuptools or pip:
python setup.py install
pip install greenify
Active greenify before initiate environment:
import greenify greenify.greenify()
Make sure the dynamic module(e.g. libmemcached) is patched before using:
Import and use the corresponding module, which is now gevent compatible.
Once activated, the green C functions will, on potentially blocking operation, pass control to gevent's main event loop, which may switch to other ready greenlet which is also in one of the green functions. So, make sure your C code can handle this kind of execution pause and resume. A thread safe program usually is ready for greenify, but remember that all the switches happen in a single thread.