Skip navigation.
 
mlRe: How to kill a thread?
FROM : Chris Kane
DATE : Tue Jan 21 20:29:37 2003

On Sunday, January 19, 2003, at 1:50PM, Mark Levin wrote:
>> And pthreads can be used safely in Obj-C apps.

>
> ...aside from the warning in the documentation that the cocoa
> libraries will not become thread-safe unless you use NSThreads?


The previous poster's statement about pthreads and ObjC is literally
true -- pthreads can be used safely within ObjC programs.  You
shouldn't attempt to use ObjC (or Cocoa functions) within such threads,
without further precautions, but if you just want a thread to execute
some C code, you don't need to take ObjC and Cocoa multithreaded.  The
threads that Foundation itself creates to do some types of operations
asynchronously are generally carefully written in C only so that
Foundation doesn't in fact make the app ObjC-threadsafe (with the
slight performance penalty that incurs).

Chris Kane
Cocoa Frameworks, Apple
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlHow to kill a thread? Tackel Jan 19, 18:07
mlRe: How to kill a thread? Nicholas Riley Jan 19, 18:34
mlRe: How to kill a thread? Shaun Wexler Jan 19, 18:55
mlRe: How to kill a thread? Philip George Jan 19, 21:12
mlRe: How to kill a thread? Brent Gulanowski Jan 19, 21:47
mlRe: How to kill a thread? Daryn Jan 19, 22:33
mlRe: How to kill a thread? Mark Levin Jan 19, 22:50
mlRe: How to kill a thread? Philip George Jan 20, 02:08
mlRe: How to kill a thread? Chris Kane Jan 21, 20:29