[Mono-dev] [PATCH] TcpChannel hang on Windows.

Zoltan Varga vargaz at gmail.com
Fri Dec 19 17:43:37 EST 2008


Hi,

  If aborting the thread is really that hard while it is stuck in
accept, perhaps it would be
easier to not abort it at all at shutdown, i.e. set a flag before
calling accept (), and in the
shutdown code, if the flag is set for a thread, simply ignore it. When
the thread returns from
accept (), it could check the thread/runtime state, and if it looks
like the runtime is shutting
down, simply exit. This has many races etc., but better than hanging
at shutdown.

                      Zoltan

On Fri, Dec 19, 2008 at 6:11 PM, Bill Holmes <billholmes54 at gmail.com> wrote:
> Kornél,
>
> I do not understand what you example shows.  I can understand the
> thread state problems.  Is that all?
>
> Are you suggesting that I add to my patch to fix the state problem?
> Are you suggesting that the socket implementation is fine in svn and
> we need to address the abort/stop thread in a more general manner?
>
> Do you have any suggestions?
>
> What I do know is background threads that are blocked are causing mono
> to hang on exit.  Foreground threads that are blocked should cause the
> process to hang on exit as that is how MS .Net behaves.
>
> Do you feel that we should not wait on background threads on exit, but
> simply kill them?
>
> I know it is a lot of questions but I am not certain of the direction
> you are trying to point me.  This is a bug that I REALLY need fixed
> now.
>
> -bill
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>


More information about the Mono-devel-list mailing list