Parallelization
This module provides parallelization utilities.
-
brownie.parallel.get_cpu_count(default=None)[source]
Returns the number of available processors on this machine.
If default is None and the number cannot be determined a
NotImplementedError is raised.
-
exception brownie.parallel.TimeoutError[source]
Exception raised in case of timeouts.
-
class brownie.parallel.AsyncResult(callback=None, errback=None)[source]
Helper object for providing asynchronous results.
Parameters: |
- callback – Callback which is called if the result is a success.
- errback – Errback which is called if the result is an exception.
|
-
get(timeout=None)[source]
Returns the result or raises the exception which has been set, if
the result is not available this method is blocking.
If timeout is given this method raises a TimeoutError
if the result is not available soon enough.
-
ready = None
True if a result is available.
-
set(obj, success=True)[source]
Sets the given obj as result, set success to False if obj
is an exception.
-
wait(timeout=None)[source]
Blocks until the result is available or the given timeout has been
reached.