Skip to main content

Package for using processes mimicking the `threading` module

Project description

Package for using processes which mimics the threading module, and allows the sharing of objects between processes.

The processing.Process class follows the API of threading.Thread. For example

from processing import Process, Queue

def f(q):
    q.put('hello world')

if __name__ == '__main__':
    q = Queue()
    p = Process(target=f, args=[q])
    p.start()
    print q.get()
    p.join()

Synchronization primitives like locks, semaphores and conditions are available, for example

>>> from processing import Condition
>>> c = Condition()
>>> print c
<Condition(<RLock(None, 0)>), 0>
>>> c.acquire()
True
>>> print c
<Condition(<RLock(MainProcess, 1)>), 0>

One can also use a manager to create shared objects either in shared memory or in a server process, for example

>>> from processing import Manager
>>> manager = Manager()
>>> l = manager.list(range(10))
>>> l.reverse()
>>> print l
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
>>> print repr(l)
<Proxy[list] object at 0x00E1B3B0>

After installation you can run the test scripts by doing either

python -m processing.test

on Python 2.5 or

python -c "from processing.test import main; main()"

on Python 2.4. This will run various test scripts using both processes and threads.

See README.txt and doc/index.html in the package directory for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

processing-0.34.zip (137.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

processing-0.34.win32-py2.5.exe (162.5 kB view details)

Uploaded Source

processing-0.34.win32-py2.4.exe (159.4 kB view details)

Uploaded Source

File details

Details for the file processing-0.34.zip.

File metadata

  • Download URL: processing-0.34.zip
  • Upload date:
  • Size: 137.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for processing-0.34.zip
Algorithm Hash digest
SHA256 908b2aaaf5b8048cc045cfaa066ebb1cfb55e46355b2d4b530d199355bbde116
MD5 789845cca4725dc98ea27f78e51ad4bf
BLAKE2b-256 d0a6697abd9bbbf43b73dcef48abaa1dcb33c15859b30760767c48fa5d2e5726

See more details on using hashes here.

File details

Details for the file processing-0.34.win32-py2.5.exe.

File metadata

File hashes

Hashes for processing-0.34.win32-py2.5.exe
Algorithm Hash digest
SHA256 88ec706b5f7358d35d1db718d402cb643479f32815e0c9d4eefa742b477b40ed
MD5 02eeb60a29be95490eb98b548efa69da
BLAKE2b-256 7a661f279feceab5c6bf7f6a999c335385bcfe54916854cda798148c7e926a2b

See more details on using hashes here.

File details

Details for the file processing-0.34.win32-py2.4.exe.

File metadata

File hashes

Hashes for processing-0.34.win32-py2.4.exe
Algorithm Hash digest
SHA256 0fb85090af4ac2c71b5c66121394f0693dc2e7709e898a7f6a60f71896c399fe
MD5 551817ca0f838f488c76cf873e6ef754
BLAKE2b-256 5b2d58707618505638ab4b2a43e900e44620ded0df5b46d4d6a17cd4233dc6c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page