performSelectorOnMainThread and other thread notifications
performSelectorOnMainThread and other thread notifications
- Subject: performSelectorOnMainThread and other thread notifications
- From: Glen Low <email@hidden>
- Date: Thu, 12 Feb 2004 19:51:12 +0800
Hi all,
I saw the recent thread [pun intended] on performSelectorOnMainThread
and it seems just what the doctor ordered for Graphviz file change
notifications. However, what is the minimal level of initialization I
have to do on the calling thread before I can use it?
Is it:
A. a naked pthread
B. a NSThread (Cocoa set to multithreaded)
C. a NSThread with an NSAutoreleasePool
D. a NSThread with a NSRunLoop running?
Another issue is, I have to run a kqueue and kevent on a separate
thread, and these are fairly low-level BSD constructs. A kqueue can
wait on several sorts of kernel events like a file change, etc. Now I
want my main thread to tell the kqueue thread to stop looking at a
file, for example, when the corresponding document is closed, but to
avoid polling it has to wait on a pipe or a signal. Can I do any of
these things from the main thread in a thread-safe manner?
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
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.