Skip to content

Instantly share code, notes, and snippets.

@mrmekon
Created December 8, 2011 20:24
Show Gist options
  • Save mrmekon/1448398 to your computer and use it in GitHub Desktop.
Save mrmekon/1448398 to your computer and use it in GitHub Desktop.
Python multiprocessing fails with PyObjC
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