Re: Simple message passing between threads
Re: Simple message passing between threads
- Subject: Re: Simple message passing between threads
- From: Douglas Davidson <email@hidden>
- Date: Wed, 13 Jun 2001 09:13:50 -0700
On Tuesday, June 12, 2001, at 06:43 PM, Richard Schreyer wrote:
I have a secondary thread I use to do calculations, and I need to send
a message to the main thread when the second thread completes it's job,
and terminates.
Distributed Objects seems like a little much for this single use.
There have been several times has come up previously on the list, but
looking over those has still left me clueless how to do this.
A little much to code, or a little much work for the system? Actually,
DO is pretty easy to code, and I believe there is an explicit example in
the NSConnection documentation of exactly the use that you intend. If
for some reason you don't want to use DO, you can just use an NSPort and
an NSPortMessage, but I think the line count will not be much different.
Douglas Davidson