[Mono-devel-list] Re: [Mono-hackers-list] Simple patch for the runtime
Lluis Sanchez
lluis at ideary.com
Mon Apr 7 17:25:09 EDT 2003
Hi Paolo,
Thanks for your review!
> > This one is quite simple. It adds an internal method for getting a guid
that
> > identifies the process (needed for the CrossAppDomainChannel) and also
fixes
> > a problem when building the vtable of a transparent proxy (interface
offset
> > should point to the new vtable entries, not the entries in the original
> > vtable).
>
> Do you really need a guid or is something like getpid() enough?
No, I need a guid. It must be an universal process identifier.
> If you really need the guid:
> 1) MonoString* process_guid; -> should be static
ok
> 2) you should store the chars directly in the static var, no point
> keeping a string around just to access the chars in it and create
> another string.
ok
> 3) I don't like much the fact that we enter unmanaged code to go back to
> managed twice anyway. The icall could be:
> ves_icall_System_AppDomain_InternalGetProcessGuid (MonoGuid *guid);
> and
> InternalGetProcessGuid (out Guid guid); in the C# side
> so you can easily invoke at least the ToString() in C# code.
Hmm, this would make things more complex, unless I can safely use one Guid
created in one domain in another domain. That's why I use an string, it is
easy to make a copy of it for each domain.
>
> I guess we need this stuff because we can't use a static variable
> since the variable need to be shared across appdomains?
Yes, this is the issue.
Regards,
Lluis.
More information about the Mono-devel-list
mailing list