• 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: Thread Safety of performSelector:withObject:afterDelay:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread Safety of performSelector:withObject:afterDelay:?


  • Subject: Re: Thread Safety of performSelector:withObject:afterDelay:?
  • From: Julien Jalon <email@hidden>
  • Date: Wed, 23 Nov 2005 19:08:33 +0100

- NSRunloop instances are not thread-safe. In particular, using
performSelector:...afterDelay: with a runloop instance which is not
the current thread's runloop is not thread-safe at all
- CFRunLoop objects are thread-safe and is the good path to access
other thread's runloops

--
Julien

On 11/23/05, Jim Correia <email@hidden> wrote:
> In the thread safety summary at
>
>         http://developer.apple.com/documentation/Cocoa/Conceptual/
> Multithreading/articles/CocoaSafety.html
>
> NSObject is listed as being thread safe. Does this mean that
>
> -[NSObject performSelector:withObject:afterDelay:]
>
> is also thread safe, even though the implementation surely involves
> the run loop, which isn't thread safe?
>
> Is the delayed invocation scheduled on the current run loop, or the
> main run loop?
>
> Finally, is there a built-in "Cocoa" way to determine if I am
> currently executing in the context of the main thread? Or must I
> write my own convenience wrapper for that test?
>
> Thanks,
> Jim
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Thread Safety of performSelector:withObject:afterDelay:? (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: NSApp sendAction
  • Next by Date: [FIXED] CoreData Fetch Request Failing When Using NSDate in NSPredicate
  • Previous by thread: Thread Safety of performSelector:withObject:afterDelay:?
  • Next by thread: [FIXED] CoreData Fetch Request Failing When Using NSDate in NSPredicate
  • Index(es):
    • Date
    • Thread