gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

PoolDb

Use this class to create a pool of processes that can use the db (in parallel).

Class that extends multiprocessing.pool to allow to use the db in the sub processes. It clears the db connection before and after the pool.

:param Pool: description :type Pool: type

Functions
__init__

Initialize self. See help(type(self)) for accurate signature.

processes : Any
initializer : Any
initargs : tuple - ()
maxtasksperchild : Any
context : Any
apply

Equivalent of func(*args, **kwds). Pool must be running.

func : Any
kwds : dict - {}
apply_async

Asynchronous version of apply() method.

func : Any
kwds : dict - {}
callback : Any
error_callback : Any
close
get_dbs
Return type : Set
imap

Equivalent of map() -- can be MUCH slower than Pool.map().

func : Any
iterable : Any
chunksize : int - 1
imap_unordered

Like imap() method but ordering of results is arbitrary.

func : Any
iterable : Any
chunksize : int - 1
join
map

Apply func to each element in iterable, collecting the results in a list that is returned.

func : Any
iterable : Any
chunksize : Any
map_async

Asynchronous version of map() method.

func : Any
iterable : Any
chunksize : Any
callback : Any
error_callback : Any
starmap

Like map() method but the elements of the iterable are expected to be iterables as well and will be unpacked as arguments. Hence func and (a, b) becomes func(a, b).

func : Any
iterable : Any
chunksize : Any
starmap_async

Asynchronous version of starmap() method.

func : Any
iterable : Any
chunksize : Any
callback : Any
error_callback : Any
terminate
Process @staticmethod
ctx : Any
kwds : Any