multiprocessing

File Purpose: tools related to multiprocessing

Functions

check_pickle(x)

checks that x, is pickleable, by pickling then unpickling.

copy_via_pickle(x)

returns copy of x via pickle.loads(pickle.dumps(x)).

identity(x)

returns x.

is_task_element(x)

returns whether x is a Task-like element.

mptest_add100(x)

adds 100 to x

mptest_echo(*args, **kw)

print inputs then return (args, kw)

mptest_sleep(t)

sleeps for t seconds, then returns t

mptest_sleep_add100(t)

sleeps for t seconds, then returns t+100

Classes

CrashIfCalled([errmsg])

callable which is not intended to be called.

IdentityTask(x[, i])

task which returns its (single) input.

MPTestClass()

empty class useful for multiprocessing testing.

Task(f[, args, kw, i])

a single task, i.e. a function, args, & kwargs.

TaskArray(tasks, *[, shape, checks])

a container for multiple tasks; each Task is a function, args, & kwargs.

TaskContainer(tasks, *args_super[, ...])

a container for multiple tasks; each Task is a function, args, & kwargs.

TaskContainerCallKwargsAttrHaver()

object with attrs corresponding to the main kwargs for TaskContainer.__call__.

TaskGroup(tasks, *[, i, errors_ok, ...])

treats a dict of Tasks as if it was a single Task.

TaskList(*tasks[, from_list])

a container for multiple tasks; each Task is a function, args, & kwargs.

TaskPartition(original, groups, **kw_super)

a container for a list of TaskGroups, each with Tasks from the same TaskContainer.

UniqueTask(name[, repr, module_name, ...])

a unique task.