Re: NSConnection and independant queuing
Re: NSConnection and independant queuing
- Subject: Re: NSConnection and independant queuing
- From: Florent Pillet <email@hidden>
- Date: Wed, 5 May 2004 10:39:18 +0200
That is, I want to enqueue tasks in the worker thread's runLoop.
My question is: will this work? the NSConnection documentation
doesn't make it clear whether the "oneway" keyword requires the
target thread's runLoop to actually consume the message before coming
back from the message send operation, or if it is just enqueuing it
in the target thread's incoming messages list (if such a thing
exists).
The message will be queued by the receiver, in order of receipt,
pending dispatch at the next run through the run loop (note: you can't
extract pending messages manually). So, assuming your worker threads
use a run loop (or can be made to; a custom one per thread is trivial
to construct) you're quite set.
That's perfect! I'm following the DO samples and use a run loop, that's
fine with me, my main concern was queuing the requests. If I want to
cancel messages waiting for dispatch, I can use a flag for that, tested
in each method, testing whether the queue should be emptied.
Thanks for the answer, Wade.
Regards,
Florent
--
Florent Pillet, Code Segment email@hidden
Developer tools and end-user products for Palm OS & Mac OS X
ICQ: 117292463
http://perso.wanadoo.fr/fpillet
_______________________________________________
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.