[Pyobjc-dev] more crasher app
Brought to you by:
ronaldoussoren
From: Burris T. E. <bu...@gi...> - 2004-03-25 16:31:55
|
I should mention that the reason each worker has it's own thread is because in the real app I'm working on, each worker calls a blocking function that doesn't return for hours. The blocking function takes callables that are used as callbacks for display. Since you can't touch appkit objects from any thread but the main thread, the callbacks use some mechanism (I've tried performOnMainThread, NSTimer, and DO) to pass the display data to the main thread so the appkit objects can be updated. This is the third time I've tried to rewrite this existing ObjC/python app (that has over a million downloads, BTW) in pyobjc and it never works. I do not believe that pyobjc can be used for multithreaded apps at all. I think my only choice is to run the workers in a subprocess and use DO to communicate with the display process, but I'm skeptical even that will work. burris |