Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
Reimplement threading.Lock, RLock and Condition with libpthread

The pthreading module provides Lock and Condition synchronization
objects compatible with Python native threading module.
The implementation, however, is based on POSIX thread library as delivered
by the libpthread. Lock and Condition are designed to be a drop-in
replacement for their respective threading counterpart.

Take a look at threading.py of Python 2. Notice that Event.wait() wakes 20
times a second and checks if the event has been set. This CPU hogging has been(more...)

src/p/t/pthreading-0.1.3/setup.py   pthreading(Download)
from distutils.core import setup
from distutils.cmd import Command
from unittest import TextTestRunner, TestLoader
import pthreading

src/v/d/vdsm-HEAD/tests/testrunner.py   vdsm(Download)
    # as long as we work with Python 2, we need to monkey-patch threading
    # module before it is ever used.
    import pthreading