Skip to content

Simple wrapper on top of python's multiprocessing library

Notifications You must be signed in to change notification settings

badmutex/ezpool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

ABOUT
=====

This is a simple interface to python's multiprocessing.Pool to map functions over data
Default behavior is to use a single processor, identical to using itertools.imap.
In the case of multiple processors (specified using ez.pool.setup_pool), computations are farmed out to other processes using the multiprocessing library.

EXAMPLE
=======

  import ezpool

  nprocs = 42
  ezpool.setup_pool(nprocs)

  def fn(x): return x*82
  data = range(99)
  results = ezpool.map(fn, data)

About

Simple wrapper on top of python's multiprocessing library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages