Re: [Pyobjc-dev] Web Services Tool example broken
Brought to you by:
ronaldoussoren
From: b.bum <bb...@ma...> - 2004-04-06 16:47:23
|
On Apr 6, 2004, at 7:21 AM, Bob Ippolito wrote: > The thing is that Foundation and Cocoa needs to know about the threads > you are using in the same way that Python needs to know about them > (via PyGILState_Ensure, etc.). There is a hook and notification that > happens in Foundation when you detach your first NSThread (which this > program never explicitly does), and you are otherwise supposed to at > least call +[NSThread currentThread] from any raw pthread that expects > to call Foundation or Cocoa code (which this program also never does). If the program doesn't call Foundation or Cocoa from the threads, then there is no need to notify the ObjC runtime (or Foundation) that the app has 'gone threaded'. And... as Ronald says. Worked before, doesn't work now... look to the changes. Also -- in a chat w/Bob last night. If we need to tie something to the lifetime of an NSThread, use NSThread's threadDictionary. That is what it is far (and what it is used for by the Foundation). b.bum |