AsyncBase

class astroquery.vo_conesearch.vo_async.AsyncBase(func, *args, **kwargs)[source]

Bases: object

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 by warnings module.

Note

Methods of the attributes can be accessed directly, with priority given to executor.

Parameters:
funcfunction

The function to run.

args, kwargs

Arguments and keywords accepted by the service request function to be called asynchronously.

Attributes:
executorconcurrent.futures.ThreadPoolExecutor

Executor running the function on single thread.

futureconcurrent.futures.Future

Asynchronous execution created by executor.

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:
timeoutint 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.