triqs.utility.dist_on_nodes.DistributionOnNodesOneStack
- class triqs.utility.dist_on_nodes.DistributionOnNodesOneStack(the_stack)[source]
Bases:
DistributionOnNodesConcrete
DistributionOnNodesconsuming a fixed stack of inputs.Stores the inputs internally as a (reversed) list so that
__next__()returns them in the original order. Each result returned by a worker is collected as a(node, value)tuple and can be retrieved viaresult(). Subclasses only need to overridethe_function().- Parameters:
- the_stacklist
Sequence of inputs to dispatch. Consumed destructively: the list is reversed in place and popped from the end.
Methods
finished()Return
Trueonce every input has been consumed.result()Return the collected list of
(node, value)result tuples.run()Run the dispatch loop and return
result().treate(x, node)Append the worker result as
(node, x)to the result list.