Re: Distant object on server thread
Re: Distant object on server thread
- Subject: Re: Distant object on server thread
- From: 정다운 <email@hidden>
- Date: Thu, 27 May 2004 19:21:25 +0900 (JST)
Awesome, the trick of setting enableMultipleThreads on an NSConnection
you get from a parameter object seems to work. There's still a
mysterious stalling when I try to access some instance vars from the
distant object on my server thread (in my code, not James Chen's code)
but I think judicious use of copyWithZone ought to fix even that. I
still don't see why enableMultipleThreads on the server's default
connection doesn't work. It looks like the whole aspect of server
threads and distant objects is poorly documented in the Apple docs.
Cheers,
DW
--- James Chen <email@hidden> wrote:
>
Hello,
>
After your reply, I write a little testing program.
>
I don't think that resolve the problem. But I think it may give some
>
clues to help.
>
I attach the source file "MyObject.m".
>
>
My simple testing program has a window with a button which connected
>
to
>
the action -launch: of MyObject.
>
Once MyObject instantiated (in my case, it's from nib), it detach a
>
thread as a server.
>
And then the action -launch: serve as a client to pass data to server
>
>
via DO call (-setData:).
>
The server receive the message -setData:, here's the trick, and try
to
>
>
pick first object in parameter and use it to obtain the connection it
>
>
use.
>
And then we could set -enableMultipleThreads. That's what I do to
>
obtain the right connection to enableMultipleThreads.
>
>
The weird part is I get no log message unless I add "redundant" loop
>
before I log the data. (in method -serverSpawn:).
>
(I don't figure out why is that so far?)
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
_______________________________________________
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.