AsyncBase¶
-
class
astroquery.vo_conesearch.vo_async.AsyncBase(func, *args, **kwargs)[source]¶ Bases:
objectBase 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 bywarningsmodule.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.Methods Summary
get([timeout])Get result, if available, then shut down thread. Methods Documentation
-
get(timeout=None)[source]¶ 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.
-