Skip to main content

A Twisted class for parallel execution of functions performing the same task, returning the result from the one that finishes first.

Project description

txdpce provides a Twisted Python class, DeferredParallelCommandExecutor. It allows you to register competing functions that compute a result. The execute method of the class calls them all one after another and returns a Deferred that will fire with the first success. The deferreds corresponding to the incomplete function calls are cancelled. If all functions fail, the deferred errs with a list of the failures.

The point is that you might have a couple of ways of getting a result (out of a cache, off the network) and you want to try them all, taking the answer from the first one that figures it out.

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

txdpce-0.1.2.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file txdpce-0.1.2.tar.gz.

File metadata

  • Download URL: txdpce-0.1.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for txdpce-0.1.2.tar.gz
Algorithm Hash digest
SHA256 47b864f18ae07a94b86e26cb4b0b2e934ef61268e00b4843a901a2644f68a687
MD5 3e5702062c1802b7685b6808b273d117
BLAKE2b-256 ae8bc548bc69324900c6ce442b15c500419603200c72d76e326c1838e905a6fb

See more details on using hashes here.

Supported by

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