COPYING: Everything I've done is CC0
[cpython-extension.git] / README
1 Test processing distribution on a multicore system using
2 ``Py_BEGIN_ALLOW_THREADS`` and ``threading.Thread``.
3
4 Build with::
5
6   $ python setup.py build
7
8 Test the time with::
9
10   $ time PYTHONPATH=build/lib.linux-x86_64-3.2/ ./grab-cores.py 2
11
12   real    0m10.075s
13   user    0m18.364s
14   sys     0m0.029s
15
16 You may need to tweak the ``PYTHONPATH`` to match the build directory
17 for your system.  The results shown are for my two-core system.
18 During the run, ``top`` showed the process pegged around 195% of the
19 CPU, so we are actually using all the available horsepower.