portage.util.futures.executor.fork module

class portage.util.futures.executor.fork.ForkExecutor(max_workers=None, loop=None)

Bases: object

An implementation of concurrent.futures.Executor that forks a new process for each task, with support for cancellation of tasks.

This is entirely driven by an event loop.

_cancel_cb(proc, future)
static _guarded_fn_call(fn, args, kwargs)
_proc_exit(future, proc)
submit(fn, *args, **kwargs)

Submits a callable to be executed with the given arguments.

Schedules the callable to be executed as fn(*args, **kwargs) and returns a Future instance representing the execution of the callable.


A Future representing the given call.

class portage.util.futures.executor.fork._ExceptionWithTraceback(exc)

Bases: object

exception portage.util.futures.executor.fork._RemoteTraceback(tb)

Bases: Exception


Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

portage.util.futures.executor.fork._rebuild_exc(exc, tb)