• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
performSelectorOnMainThread and other thread notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: performSelectorOnMainThread and other thread notifications
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Use of mouseOver & live-feedback (possibly OT)
  • Next by Date: Re: Custom control class question
  • Previous by thread: Re: Use of mouseOver & live-feedback (possibly OT)
  • Next by thread: Re: performSelectorOnMainThread and other thread notifications
  • Index(es):
    • Date
    • Thread