[Mono-list] Re: Embedded Mono with native threads

Alexey Tsynaev alt at inetlab.ru
Thu Aug 25 07:18:02 EDT 2005


But actually I don't invoke any unmanaged code from c# code
How your advice can be used in my situation?

Host application creates thread where function from my plugin is called.
In this function I just get MonoMethod and execute it by
mono_runtime_invoke.
That is all.

> > 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 ?
> 
> Follow this thread
> 
> http://lists.ximian.com/pipermail/mono-list/2005-August/028129.html
> 
> Rob
> 



More information about the Mono-list mailing list