On 10/08/02 George Kodinov wrote:
> I'm trying to embed the Mono runtime into a Linux pthreads application 
> (so it can execute multiple managed code instances independantly).
> What is the correct way of going about it ?
> Can I for example create multiple instances of the Mono runtime 
> (mono_jit_init) ?

No. mono_jit_init() should be called only once.
You should be able to create separate domains if needed and execute
code in them. It's probably easier to initiate this from within C# code,
since I don't think there's an easy to use API to do it from C, yet.
If you need multiple managed threads, I suggest starting them from C#
code, too.

> Are there any special considerations/function wrappers re. Boehm GC usage ?

The Boehm GC needs to intercept a few pthread calls: you just need
to include the gc.h header file in every C file that uses the pthread
calls and then you need to compile your program with an additional
#define (according to the OS, it's -DGC_LINUX_THREADS on linux).

lupus

-- 
-----------------------------------------------------------------
[EMAIL PROTECTED]                                     debian/rules
[EMAIL PROTECTED]                             Monkeys do it better

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to