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.36.zip (150.3 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.36.win32-py2.5.exe (172.0 kB view details)

Uploaded Source

processing-0.36.win32-py2.4.exe (169.0 kB view details)

Uploaded Source

File details

Details for the file processing-0.36.zip.

File metadata

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

File hashes

Hashes for processing-0.36.zip
Algorithm Hash digest
SHA256 05103275dae322489b8551a80063f0c2054d1b0b83d69b10f24afbcb039c38ee
MD5 1b72b177d906735f8a23ae563e8d757a
BLAKE2b-256 1a76f7ed5f0e3dee3c69abc76cb0cfa32394a516b7a3aa7be130c567743f865e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for processing-0.36.win32-py2.5.exe
Algorithm Hash digest
SHA256 0628fe7f9ee4e70805b273865fca1edac84e34ddc483157ef55f85bd5448a2b8
MD5 2c7428bb0ec5fd1736f875b455c93eef
BLAKE2b-256 32800d4fdf73a1db55424160a5c8d4ac94e434f59dc49b586dadf93126e54c80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for processing-0.36.win32-py2.4.exe
Algorithm Hash digest
SHA256 6ea89c1a37f1dd950acb9b406f17ecc30aac8d69d7029f42c77cab3253149f57
MD5 fccb496a10dad52041997af0f0748613
BLAKE2b-256 3bb2a5ece80e0039b3c04c33720236f8dd45d6ab42c81b72e2435cb35d8f0fa3

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