def get(dsk, result, cache=None, num_workers=None, **kwargs):
    pool = _globals['pool']

    if pool is None:
        if num_workers:
            pool = ThreadPool(num_workers)
        else:
            pool = default_pool

    queue = Queue()
    results = get_async(pool.apply_async, len(pool._pool), dsk, result,
                        cache=cache, queue=queue, get_id=_thread_get_id,
                        **kwargs)

    return results
Threaded cached implementation of dask.get
dataset/ETHPy150Open dask/dask/dask/threaded.py/get