• 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
Asynchronous call of Selector - is this code OK?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Asynchronous call of Selector - is this code OK?


  • Subject: Asynchronous call of Selector - is this code OK?
  • From: Manfred Lippert <email@hidden>
  • Date: Fri, 01 Feb 2002 20:05:19 +0100

Hi,

is the following code OK, or may it have some strange effects (e.g. stack
overflow) if "someCondition" will not be TRUE for a longer time?

- (void) delayedMethod() {
// will be "asynchronously" called when "someCondition" becomes TRUE
}

- (void) callDelayedMethodAtSomeCondition {
if (someCondition) {
[self delayedMethod];
} else {
[self performSelector:@selector(callDelayedMethodAtSomeCondition)
withObject:nil
afterDelay:0.01];
}
}

Regards,
Mani


  • Prev by Date: Re: InputServer/Manager
  • Next by Date: Multiple NSTextView in an NSScrollView -- if possible
  • Previous by thread: Re: InputServer/Manager
  • Next by thread: Re: Asynchronous call of Selector - is this code OK?
  • Index(es):
    • Date
    • Thread