• 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 protocol modifiers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thread protocol modifiers


  • Subject: Re: thread protocol modifiers
  • From: John Stiles <email@hidden>
  • Date: Fri, 04 Jan 2008 17:48:15 -0800

-performSelectorInMainThread: certainly predates Leopard…? I distinctly remember using it back in the 10.2/10.3 days.


email@hidden wrote:

However my problem now is that with all three marked as (oneway void)
(sending async msgs), message #2 requires a few seconds to complete while
message #3 depends on message #2 before it can start, yet msg #3 is done
before msg #2 can finish. I've also seen once where they arrived out of
order.



// from the client

[server sendMsg1];

[server sendMsg2];

[server sendMsg3];


Is there another way to call asynchronously, yet guarantee that the messages
arrive in order? Or someway to call w/o the GUI blocking for a server
message return?


You can use :
- NSConnection/NSPorts ( http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/articles/SocketComm.html#//apple_ref/doc/uid/TP40001479 )
- YAMessageQueue (10.4-): http://www.2pi.dk/tech/cocoa/message_queue.html
- NSOperation/NSOperationQueue (10.5+) :
- [NSObject performSelector:onThread]/[NSObject performSelectorInMainThread:] (10.5+);



:: marcelo.alves _______________________________________________

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
_______________________________________________

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


  • Follow-Ups:
    • Re: thread protocol modifiers
      • From: "William Zumwalt" <email@hidden>
References: 
 >thread protocol modifiers (From: "William Zumwalt" <email@hidden>)
 >Re: thread protocol modifiers (From: email@hidden)

  • Prev by Date: Editable NSTextField and layout
  • Next by Date: Re: thread protocol modifiers
  • Previous by thread: Re: thread protocol modifiers
  • Next by thread: Re: thread protocol modifiers
  • Index(es):
    • Date
    • Thread