astro query:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- astroquery v0.4.11 »
- VO Simple Cone Search (`astroquery.vo_conesearch`) »
- AsyncBase

# AsyncBase

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

  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:
    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 by `executor`.

  Methods Summary

  `get`(*[, timeout]) | Get result, if available, then shut down thread.

  Methods Documentation

  get(*, timeout=None)

    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`.