RE: [Mono-list] Re: Embedded Mono with native threads
Paolo, I have patched mono 1.1.8.3, but it does not work for me I still get message include gc.h. Any ideas? Then you are responsible for calling mono_thread_attach() yourself. Anyway, the patch I posted should solve your issue as well: care to try it out? ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
RE: [Mono-list] Re: Embedded Mono with native threads
On 08/25/05 Alexey Tsynaev wrote: But actually I don't invoke any unmanaged code from c# code 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. Then you are responsible for calling mono_thread_attach() yourself. Anyway, the patch I posted should solve your issue as well: care to try it out? I'm calling mono_thread_attach() in plugin's function before executing managed code. Where I can get your patch? ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
RE: [Mono-list] Re: Embedded Mono with native threads
El vie, 26-08-2005 a las 11:44 +0500, Alexey Tsynaev escribió: On 08/25/05 Alexey Tsynaev wrote: But actually I don't invoke any unmanaged code from c# code Hi Alexey, Where I can get your patch? You can find it in the following Paolo's message: http://lists.ximian.com/pipermail/mono-list/2005-August/028134.html Cheers, ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list -- Francis Brosnan Blazquez [EMAIL PROTECTED] ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
RE: [Mono-list] Re: Embedded Mono with native threads
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 ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Re: Embedded Mono with native threads
On 08/25/05 Alexey Tsynaev wrote: 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. Then you are responsible for calling mono_thread_attach() yourself. Anyway, the patch I posted should solve your issue as well: care to try it out? lupus -- - [EMAIL PROTECTED] debian/rules [EMAIL PROTECTED] Monkeys do it better ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list