[Mono-devel-list] embedding mono in the main thread

Bernie Solomon bernard at ugsolutions.com
Thu Jan 15 18:47:09 EST 2004


I'm interested in the answer to this too. libgc by itself presumably must be
able to cope otherwise it would be hard to use (e.g. for leak detection in C
programs) but currently I don't know enough to know whether this is
configuration dependent. And if it is does mono's match the required one.
Also whether any of mono's modifications to the GC invalidates this. The MS
runtime does stay in the same thread when you host it as I believe does a
typical JVM so it can be done - question is what does it take to work with
mono?

Bernie
----- Original Message ----- 
From: "Dave Camp" <dave at ximian.com>
To: <mono-devel-list at ximian.com>
Sent: Thursday, January 15, 2004 2:00 PM
Subject: [Mono-devel-list] embedding mono in the main thread


> I'm working on a nautilus extension that loads mono.  Nautilus
> extensions are called in the main thread, so I'd like to run the mono
> code in the main thread.
>
> Miguel tells me that it's ok to run from the main thread (which is not
> created with the #include-before-pthread trick) as long as all
> references to mono objects are stored on the heap.  But libmono seems to
> keep references on the stack (usually only temporarily, but presumably
> the gc can run in a different thread at some point).
>
> Is it reasonable to try embedding mono in the main thread?
>
> Thanks,
> -dave
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>




More information about the Mono-devel-list mailing list