alex-sherman / deco

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I specify the number of processes to use manually?

theRealSuperMario opened this issue · comments

Love the project, saves me a lot of code.
I was just wondering if I can manually specify how many processes I want to allocate.
sorry if the answer is somewhere but I did not find it.

Yeah there is, I have a small wiki on this project page that has a bit of documentation on that. All of the keyword arguments passed to @concurrent get passed to the constructor of a multiprocessing.Pool. So it's really just:

@concurrent(processes=2)
def work():
    ...