AsyncBase¶
-
class
astropy.vo.client.async.
AsyncBase
(func, *args, **kwargs)[source] [edit on github]¶ Bases:
object
Deprecated since version 2.0: The AsyncBase class is deprecated and may be removed in a future version. Use astroquery.vo_conesearch.async.AsyncBase instead.
- Base class for asynchronous VO service requests
using
concurrent.futures.ThreadPoolExecutor
.Service request will be forced to run in silent mode by setting
verbose=False
. Warnings are controlled bywarnings
module.Note
Methods of the attributes can be accessed directly, with priority given to
executor
.
Parameters: func : function
The function to run.
- args, kwargs
Arguments and keywords accepted by the service request function to be called asynchronously.
Attributes
executor ( concurrent.futures.ThreadPoolExecutor
) Executor running the function on single thread. future :concurrent.futures.Future
Asynchronous execution created byexecutor
.Deprecated since version 2.0: The AsyncBase class is deprecated and may be removed in a future version. Use astroquery.vo_conesearch.async.AsyncBase instead.
Methods Summary
get
([timeout])Get result, if available, then shut down thread. Methods Documentation
-
get
(timeout=None)[source] [edit on github]¶ Get result, if available, then shut down thread.
Parameters: timeout : int or float
Wait the given amount of time in seconds before obtaining result. If not given, wait indefinitely until function is done.
Returns: result
Result returned by the function.
Raises: Exception
Errors raised by
concurrent.futures.Future
.