Re: How to tell if on main thread
Re: How to tell if on main thread
- Subject: Re: How to tell if on main thread
- From: Glen Simmons <email@hidden>
- Date: Fri, 18 Jun 2004 12:09:06 -0500
FYI: there's a function in pthread.h - pthread_main_np() that works
very nicely. (This tip supplied to me by Matt Watson at Apple. Thanks!)
On 18 Jun, 2004, at 11:26 AM, Glen Simmons wrote:
How can I tell if I'm currently on the main thread or a secondary
thread? I don't need to know if I'm in a specific secondary thread,
just that I'm in the main thread or not. I know about NSThread's
threadDictionary, and I know I could put a key/value in there, but
that seems a little hackish. Thoughts?
Thanks,
Glen
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.