Re: DO Proxy
Re: DO Proxy
- Subject: Re: DO Proxy
- From: Ovidiu Predescu <email@hidden>
- Date: Mon, 13 May 2002 21:10:32 -0700
On Mon, 13 May 2002 21:25:05 -0500, Timothy Ritchey <email@hidden> wrote:
>
Okay, here is what my experimentation seems to have found:
>
>
1) given two applications/threads/tasks, etc. A and B that have been
>
connected with NSConnection, if you pass an object, say X, from A to B,
>
and then back from B to A, the run-time is smart enough to give you back
>
the original object, and not a proxy.
>
>
2) Add a third app C. If C connects to B and asks for X, it will
>
establish its own connection to A. B can disappear, and C's proxy to X
>
will keep on trucking.
>
>
3) However, if you pass X from C back to A, A gets a proxy to X, and not
>
the original object back as in (1). The level of indirection that occurs
>
in (2) does not appear to be handled optimally by the run-time system.
I wonder how this is possible, since C has a proxy to X in A. If you
pass the proxy to X from C back into A, A should get its own object,
and not a proxy. Is this last proxy a proxy to C's proxy to A, if you
understand what I mean ;)? Something doesn't sound right to me if
this is the case, as it contradicts the way the so-called "triangle
connection" works in DO.
I remember in the system I implemented long ago it was impossible to
invoke a message on a proxy to a proxy to an object using the NeXT
runtime. This was because in the NeXT runtime the Objective-C selector
has no method signature information associated with it, so it is
impossible to de-construct the method call without having the real
class of the receiver available. But since in the case of a proxy to a
proxy the receiver's class is the Proxy class, it is impossible to
obtain this information.
The GNU Objective-C runtime helps in such a case since the selector
has the method signature information associated with it. Nevertheless,
the correct solution is to short-circuit the triangle connection by
creating a direct connection.
Regards,
--
Ovidiu Predescu <email@hidden>
>
>> I'm in the job market again, check out my resume and qualifications at:
http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)
_______________________________________________
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.
References: | |
| >DO Proxy (From: Timothy Ritchey <email@hidden>) |