Skip to main content

DeferredResult

This library provides simple deferred result.

Usage

Create deferred result:

def_result = DeferredResult[str]()

Then you can wait for the result using optional timeout:

result = def_result.wait(timeout=1)

While waiting for result other thread can set result:

def_result.resolve('Hello World')

After resolving result all threads waiting for result will be resumed.

It is also possible to reject deferred result:

def_result.reject(RuntimeError('Well....'))

In that case all threads waiting for result will be resumed and exception passed to reject will be thrown.

Release files for deferred-result 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deferred-result 0.1.1
File Size Uploaded
deferred_result-0.1.1.tar.gz 2.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deferred-result 0.1.1
File Interpreter ABI Platform
deferred_result-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.6 kB

Release files / deferred_result-0.1.1.tar.gz

Download URL deferred_result-0.1.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f4d222c63fc23df8d38a9a1fa3a9fae03753a80a5c1bf50e31974aca9d761aec
BLAKE2b-256 checksum
How to use checksums
4215f623edf0db3454d5e91b4a05c88d6ee8396029949e3c4482c4ab6d1440f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

Release files / deferred_result-0.1.1-py3-none-any.whl

Download URL deferred_result-0.1.1-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ffd5e9daa6ba27cbbcb7cb07aea63a83ca85a1fbf4671b0265a6177489a3c54
BLAKE2b-256 checksum
How to use checksums
80d1d87786c76f238f5603d8515e7ad3131d48588ba4adb34ea55a7f7ebca66c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page