A naive synchronous version of get_async Can be useful for debugging.
(dsk: Mapping, keys: Sequence[Key] | Key, **kwargs)
| 587 | |
| 588 | |
| 589 | def get_sync(dsk: Mapping, keys: Sequence[Key] | Key, **kwargs): |
| 590 | """A naive synchronous version of get_async |
| 591 | |
| 592 | Can be useful for debugging. |
| 593 | """ |
| 594 | kwargs.pop("num_workers", None) # if num_workers present, remove it |
| 595 | return get_async( |
| 596 | synchronous_executor.submit, |
| 597 | synchronous_executor._max_workers, |
| 598 | dsk, |
| 599 | keys, |
| 600 | **kwargs, |
| 601 | ) |
| 602 | |
| 603 | |
| 604 | """ Adaptor for ``multiprocessing.Pool`` instances |