5

I am looking for a working example of multiprocessing.Queue after being pointed to it from this question: Python utilizing multiple processors

I came across this, but it only seems to use one of my 12 processors even when I change num_processes=12. I also changed num_jobs = 200000 so that it wouldn't complete so fast.

Can someone tell me what's wrong with that example or point me to one that works?

1
  • It seems like that was just a bad example where it took longer to put together the list of work to do than it actually took to do the work. I put together something else with a nearly identical Worker class and got it to utilize all processors. Commented Feb 22, 2011 at 21:21

1 Answer 1

3

There are examples in the Python docs.

Do these examples work? If not, it may be that the problem itself is not Python, but something else instead.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.