[Mono-dev] Embedded Mono/Program freezes
Janne Rantala
janne.rantala at gmail.com
Sun Aug 20 07:32:01 EDT 2006
2006/8/20, Robert Jordan <robertj at gmx.net>:
> I can reproduce it. The socket connection to the web server
> hosting the web service remains open after the first
> mono_runtime_exec_managed_code terminates and the second
> run freezes the process.
>
> If I use mono_thread_attach, everything works as expected.
>
> You should really try to get mono_thread_attach running,
> because mono_runtime_exec_managed_code looks deprecated.
>
> How do you load mono-1.dll? LoadLibrary? If so, when?
> If you don't load it right after the process starts,
> the GC will miss all threads that have been created
> in the meanwhile.
>
> Robert
That's it! Mono is loaded with LoadLibrary, but before that is done,
there were some threads that had already been initialized and like you
said GC must have missed those. So when I load Mono before threads are
initialized and remove that mono_runtime_exec_managed code and I'm not
getting that GC -error anymore. And the best part is that I can run
that program as many times as I want without any errors :)
Thanks a lot Robert!
By the way, do you know how exactly Mono uses those threads? I'm just
wondering if it has any affect on the normal use of our server-client
program.
Janne
More information about the Mono-devel-list
mailing list