pyslurmutils.concurrent.rest.SlurmRestExecutor#

class pyslurmutils.concurrent.rest.SlurmRestExecutor(client=None, **kw)[source]#

Bases: object

map(fn, *iterables, timeout=None)[source]#

From concurrent.future._base.Executor

Returns an iterator equivalent to map(fn, iter).

Args:
fn: A callable that will take as many arguments as there are

passed iterables.

timeout: The maximum number of seconds to wait. If None, then there

is no limit on the wait time.

Returns:

An iterator equivalent to: map(func, *iterables) but the calls may be evaluated out-of-order.

Raises:
TimeoutError: If the entire result iterator could not be generated

before the given timeout.

Exception: If fn(*args) raises for any values.

shutdown(wait=True, cancel_futures=False)[source]#
Parameters:
  • wait (bool) –

  • cancel_futures (bool) –

submit(func, *args, **kwargs)[source]#
Return type:

Future