Created
December 8, 2011 20:24
-
-
Save mrmekon/1448398 to your computer and use it in GitHub Desktop.
Python multiprocessing fails with PyObjC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import multiprocessing | |
import objc | |
from Foundation import * | |
class Test: | |
def __init__(self): | |
self.proc = multiprocessing.Process(target=self.run) | |
def start(self): | |
self.proc.start() | |
def run(self): | |
pool = NSAutoreleasePool.alloc().init() | |
runloop = NSRunLoop.currentRunLoop().getCFRunLoop() | |
del pool | |
t = Test() | |
t.start() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment