[Mono-list] Embedded Mono with native threads

Alexey Tsynaev alt at inetlab.ru
Wed Aug 24 16:44:57 EDT 2005


I have implemented plugin for third-party program.
In init function I have created deamon and open assembly.
Then host program start one of plugin's functions which invoke assembly
method.

In single thread mode it works fine.
But in multi-thread mode I get error message during call
mono_thread_attach() in plugin's function

** ERROR **: Thread 0x409 calling into managed code is not registered with
the GC. On UNIX, this can be fixed by #i
nclude-ing <gc.h> before <pthread.h> in the file containing the thread
creation code. 

Unfortunately, I can't add this include to third-party code.
Is there any other solution to start it work ?





More information about the Mono-list mailing list