bibliopixel.util.threads.worker module

bibliopixel.util.threads.worker.DEFAULT_COUNT = 4

Distribute tasks amongst workers Originally from: https://github.com/rec/bbcprc/blob/master/bbcprc/worker.py

class bibliopixel.util.threads.worker.Worker(queue, counter)[source]

Bases: multiprocessing.context.Process

run()[source]

Method to be run in sub-process; can be overridden in sub-class

class bibliopixel.util.threads.worker.Workers(count=4)[source]

Bases: object

run(*args)[source]
bibliopixel.util.threads.worker.work_on(function, items, count=4)[source]