Skip to content

Commit

Permalink
num-workers kwargs passes through to threaded get
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Aug 3, 2015
1 parent 1ab72aa commit 616b77f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dask/threaded.py
Expand Up @@ -19,7 +19,7 @@ def _thread_get_id():
return current_thread().ident


def get(dsk, result, cache=None, **kwargs):
def get(dsk, result, cache=None, num_workers=None, **kwargs):
""" Threaded cached implementation of dask.get
Parameters
Expand All @@ -46,7 +46,10 @@ def get(dsk, result, cache=None, **kwargs):
pool = _globals['pool']

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

queue = Queue()
results = get_async(pool.apply_async, len(pool._pool), dsk, result,
Expand Down

0 comments on commit 616b77f

Please sign in to comment.