Module: vemomoto_core.concurrent.nicepar
Module: vemomoto_core.concurrent.nicepar#
Created on 27.04.2016
@author: Samuel
Classes:
|
|
|
|
|
|
|
|
|
|
|
Context manager ensuring that no dirty read/write occurs. |
|
Class to simplify the implementation of objects whose methods can be executed in parallel. |
|
|
|
Functions:
|
- class CircularParallelCounter(size=1, lock=None)[source]#
Bases:
vemomoto_core.concurrent.nicepar.Lockable
Methods:
next
()reset
()
- class Locked(parent)[source]#
Bases:
object
Context manager ensuring that no dirty read/write occurs. Use with the “with” statement:
- with Locked(self):
# do something that requires the object to be # accassible to this process only pass
- class ParallelClass(num_workers=None, make_sharable_functions=[], exclude=[], prohibit_sharing=False)[source]#
Bases:
vemomoto_core.concurrent.nicepar.Lockable
Class to simplify the implementation of objects whose methods can be executed in parallel.
Methods:
parmap
(f, argList)Executes f(arg) for arg in argList in parallel returns a list of the results in the same order as the arguments, invalid results (None) are ignored
postpone_task
(f, *args)
- class ParallelCounter(size=1, interval=None, lock=None, manager=None)[source]#
Bases:
vemomoto_core.concurrent.nicepar.Lockable
Methods:
next
()reset
()