Strange affinity side effect with multiprocessing.

G

Greg MacDonald

Hi Everyone,

I'm having a strange problem with the multiprocessing package and
Panda3D. Importing panda modules causes multiprocessing to only use
one of my cores.

I've created an example test case. It uses an infinite loop to ping
the cores so you'll have to manually kill the python processes.

So if I run the following I can see in my task manager that both cores
are at 100%.

Code:

#from pandac.PandaModules import Point2
from multiprocessing import Pool

def dummyWorker(a):
while True:
continue

class DummyTester(object):
def __init__(self):
self.pool = Pool(2)

def go(self):
result = self.pool.map_async(dummyWorker, range(2))
result.get()

if __name__ == "__main__":
DummyTester().go()


But if I uncomment out that one line there it only uses one of my cores.

This is with a fresh download of panda 1.7.0 on windows xp, python
2.6, and intel core2 duo.

I'm completely at a loss so any thoughts would be greatly appreciated. Thx.

-Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top