Re: [Pyobjc-dev] Threading?
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-09-06 00:26:07
|
On Friday, Sep 5, 2003, at 20:15 America/New_York, Jiva DeVoe wrote: > How hard is the non-threadsafeness problem with PyObjC? Just > curious... > > And any suggestions for a workaround if I need to create a thread. > > (ie: the fact that one basically can't create threads in a pyobjc app) That's not true. It's only a little less thread-safe than a typical ObjC application. Some of the PyObjC examples use threads, look at those. There's a lot of things in Cocoa that can only happen on the main thread (the application runloop thread), regardless of what language you're programming in. Threading is generally pretty cumbersome in general, in many cases you don't even need it. For example, I've written a CoreFoundation reactor for Twisted that allows one to do all the networking you could possibly want without using additional threads in a Cocoa application. -bob |