[Pythonmac-SIG] PyObjC and ObjC threads

Robert Brown brownr at ucalgary.ca
Thu Jul 21 00:46:08 CEST 2005


I would like to write a multithreaded application, mostly to take  
advantage of dual processors... first, does Python's thread API do  
this?  Last time I checked it would only run on one processor.

I've written a thread class in ObjectiveC that works nicely.  It uses  
Apple's distributed objects for communication.  It can be called  
without problems from Python until one of the methods returns (oneway  
void) instead of just (void), which is sort of critical for useful  
threading.  When one of the methods is (oneway void) Python crashes  
with a bus error.  If the ObjC thread class is used by another  
ObjectiveC class (which itself has no oneway void functions) there's  
no problem, everything works great.  This problem occurs even if the  
object is not running on a different thread, ie it's just a simple  
method call to a regular object except that the method returns oneway  
void.

Any ideas why PyObjC hates (oneway void) functions so much?


---------------------------------------------------
Robb Brown
Seaman Family MR Research Centre
Calgary, Alberta, Canada

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050720/9a7892ad/attachment.htm


More information about the Pythonmac-SIG mailing list