[Mono-dev] [PATCH] New shutdown code

Rodrigo Kumpera kumpera at gmail.com
Thu Dec 13 13:51:39 EST 2007


On Dec 13, 2007 4:31 PM, Mark Probst <mark.probst at gmail.com> wrote:

> Hey!
>
> > @@ -762,7 +774,8 @@
> >
> >      THREAD_DEBUG (g_message ("%s: Attached thread ID %"G_GSIZE_FORMAT"
> > (handle %p)", __func__, tid, thread_handle));
> >
> > -    handle_store(thread);
> > +    may_start = handle_store(thread);
> > +    g_assert (may_start);
> >
> > Why are you asserting here? Shouldn't the thread just play dead is
> may_start
> > is false?
>
> If my understanding of the code is correct that path is only gone
> through at startup for the first thread, before any managed code is
> executed, so there was no chance to even attempt a shutdown, yet.  Am
> I wrong?
>
> Mark
>


Well, I'm not the one to answer that, but native to managed wrappers can
call into this function going throught mini.c : mono_jit_thread_attach. It's
a wild guess, but an unmanaged thread calling for the first time into
managed code during shutdown would assert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071213/0821bf78/attachment.html 


More information about the Mono-devel-list mailing list