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.
- 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.
- ready = None¶
True if a result is available.
- wait(timeout=None)[source]¶
Blocks until the result is available or the given timeout has been reached.
- 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.