Skip navigation.
 
mlRe: thread protocol modifiers
FROM : William Zumwalt
DATE : Sat Jan 05 02:49:34 2008

I'm developing on 10.4 and have already implemented my thread using mach
ports as your first link shows, this is how my client sends the msgs to my
server thread.


However, my client is blocking when the msgs are sent to the server unless I
use the protocol modifiers (like oneway) on the thread, which then give me a
different problem.

On Jan 4, 2008 7:38 PM, <marcelo.<email_removed>> 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
>

Related mailsAuthorDate
mlthread protocol modifiers William Zumwalt Jan 5, 02:06
mlRe: thread protocol modifiers marcelo.alves Jan 5, 02:38
mlRe: thread protocol modifiers John Stiles Jan 5, 02:48
mlRe: thread protocol modifiers William Zumwalt Jan 5, 02:49
mlRe: thread protocol modifiers William Zumwalt Jan 5, 02:54
mlRe: thread protocol modifiers Ken Thomases Jan 5, 08:36
mlRe: thread protocol modifiers James Bucanek Jan 5, 17:09
mlRe: thread protocol modifiers William Zumwalt Jan 5, 22:35
mlRe: thread protocol modifiers William Zumwalt Jan 5, 22:44
mlRe: thread protocol modifiers James Bucanek Jan 6, 02:35
mlRe: thread protocol modifiers James Bucanek Jan 6, 02:35
mlRe: thread protocol modifiers William Zumwalt Jan 6, 03:35
mlRe: thread protocol modifiers glenn andreas Jan 6, 04:16
mlRe: thread protocol modifiers William Zumwalt Jan 6, 04:25
mlRe: thread protocol modifiers James Bucanek Jan 6, 08:04
mlRe: thread protocol modifiers William Zumwalt Jan 6, 09:28
mlRe: thread protocol modifiers Steve Weller Jan 6, 18:55