• 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
Re: Can't perform selectors after delay in a secondary thread?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't perform selectors after delay in a secondary thread?


  • Subject: Re: Can't perform selectors after delay in a secondary thread?
  • From: Bill Bumgarner <email@hidden>
  • Date: Tue, 01 Sep 2009 22:41:05 -0700


On Sep 1, 2009, at 10:37 PM, Laurent Daudelin wrote:

I don't explicitly create one. However, from inside the beginning of the method that runs in this secondary thread, I did print a trace of the output of [NSRunLoop currentRunLoop] and I did get information about the current runloop, which I assumed was set up when I detached. Am I to assume that this loop is actually the main run loop?

No -- you need to explicitly run the run loop for performSelector:withObject:afterDelay: to work.


If the run loop isn't running, a bunch of things -- including that -- won't work.

If you create a thread like:

thread_fun() {
while(1) {
   ... wait for stuff ...;
   ... do things to stuff ...;
};
}

Then you aren't running a run loop.

b.bum

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Can't perform selectors after delay in a secondary thread? (From: Laurent Daudelin <email@hidden>)
 >Re: Can't perform selectors after delay in a secondary thread? (From: Clark Cox <email@hidden>)
 >Re: Can't perform selectors after delay in a secondary thread? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Re: Can't perform selectors after delay in a secondary thread?
  • Next by Date: Re: contextual menu plugin example in cocoa
  • Previous by thread: Re: Can't perform selectors after delay in a secondary thread?
  • Next by thread: NSOutlineView Source List not looking like expected
  • Index(es):
    • Date
    • Thread