• 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: [obj performSelectorOnMainThread: ...] vs. [runLoop performSelector: ...]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [obj performSelectorOnMainThread: ...] vs. [runLoop performSelector: ...]


  • Subject: Re: [obj performSelectorOnMainThread: ...] vs. [runLoop performSelector: ...]
  • From: David Remahl <email@hidden>
  • Date: Tue, 13 May 2003 11:16:18 +0200

I don't know how much different performSelectorOnMainThread::: is compared to performSelector::::, but why don't you use:

[obj performSelector:aSelector withObject:anArg afterDelay:0.0];

/ Rgds, David

On Tuesday, May 13, 2003, at 10:39 AM, Just van Rossum wrote:

Given a *non-threaded* application, is there any significant difference
between using

[obj performSelectorOnMainThread: aSelector withObject: anArg
waitUntilDone NO];

and

[[NSRunLoop currentRunLoop] performSelector: aSelector
target: obj argument: anArg order: someLargeishValue
modes: [NSArray arrayWithObject: NSDefaultRunLoopMode]];

?

I want to asynchronously do some work in small chunks, without using
threads and without blocking the UI. I think I'd prefer to use the
former method as it's more convenient.

Just
_______________________________________________
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.
_______________________________________________
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: [obj performSelectorOnMainThread: ...] vs. [runLoop performSelector: ...]
      • From: Just van Rossum <email@hidden>
  • Prev by Date: [OT] iTunes 4 blows
  • Next by Date: Re: self release
  • Previous by thread: [obj performSelectorOnMainThread: ...] vs. [runLoop performSelector: ...]
  • Next by thread: Re: [obj performSelectorOnMainThread: ...] vs. [runLoop performSelector: ...]
  • Index(es):
    • Date
    • Thread