Home All Groups Group Topic Archive Search About

Unexpected behavoir from Thread.Join

Author
16 May 2006 2:42 PM
Jrax
Hi,

Wondering if anyone would know if behavoir we are seeing w/Join method is
expected.

We are seeing the Join method time out on a background thread after 5
seconds. 

When we call Join ( from UI thread ) we know that the background thread has
already exited its while loop and should be ready to fall out of its thread
proc.

When we timeout from Join we see that the thread we want to join to is still
running and alive.

When Join is called the thread priority of the background thread is
somethings below normal and sometimes above normal ( toggled by another
thread ).  We see the join timeout for both cases above.

Thanx

jra

Due to previous problems w/Join ( hangs ) the f

Author
16 May 2006 3:38 PM
Barry Kelly
Jrax <J***@discussions.microsoft.com> wrote:

> When we timeout from Join we see that the thread we want to join to is still
> running and alive.

What is it running when you break into it with the debugger?

-- Barry
Author
16 May 2006 6:42 PM
Alvin Bruney
I'm not sure I understand what you are saying. Join doesn't time out unless
you pass in a timeout parameter. In that case, the waiting thread simply
moves on. You should read the return parameter on the join call to determine
the exit status of the join on the called thread to see what is happening.

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

Show quote
"Jrax" <J***@discussions.microsoft.com> wrote in message
news:F9D3F315-5ED6-4415-833D-12C249A91044@microsoft.com...
> Hi,
>
> Wondering if anyone would know if behavoir we are seeing w/Join method is
> expected.
>
> We are seeing the Join method time out on a background thread after 5
> seconds.
>
> When we call Join ( from UI thread ) we know that the background thread
> has
> already exited its while loop and should be ready to fall out of its
> thread
> proc.
>
> When we timeout from Join we see that the thread we want to join to is
> still
> running and alive.
>
> When Join is called the thread priority of the background thread is
> somethings below normal and sometimes above normal ( toggled by another
> thread ).  We see the join timeout for both cases above.
>
> Thanx
>
> jra
>
> Due to previous problems w/Join ( hangs ) the f
Author
16 May 2006 7:11 PM
Jrax
Hi Alvin,

We are using the Join that takes a timeout value and the return param is
false, indicating that the thread did not terminate w/in the specfied timeout
value.

Thanx

jra

Show quote
"Alvin Bruney" wrote:

> I'm not sure I understand what you are saying. Join doesn't time out unless
> you pass in a timeout parameter. In that case, the waiting thread simply
> moves on. You should read the return parameter on the join call to determine
> the exit status of the join on the called thread to see what is happening.
>
> --
>
> ________________________
> Warm regards,
> Alvin Bruney [MVP ASP.NET]
>
> [Shameless Author plug]
> Professional VSTO.NET - Wrox/Wiley
> The O.W.C. Black Book with .NET
> www.lulu.com/owc, Amazon
> Blog: http://www.msmvps.com/blogs/alvin
> -------------------------------------------------------
>
> "Jrax" <J***@discussions.microsoft.com> wrote in message
> news:F9D3F315-5ED6-4415-833D-12C249A91044@microsoft.com...
> > Hi,
> >
> > Wondering if anyone would know if behavoir we are seeing w/Join method is
> > expected.
> >
> > We are seeing the Join method time out on a background thread after 5
> > seconds.
> >
> > When we call Join ( from UI thread ) we know that the background thread
> > has
> > already exited its while loop and should be ready to fall out of its
> > thread
> > proc.
> >
> > When we timeout from Join we see that the thread we want to join to is
> > still
> > running and alive.
> >
> > When Join is called the thread priority of the background thread is
> > somethings below normal and sometimes above normal ( toggled by another
> > thread ).  We see the join timeout for both cases above.
> >
> > Thanx
> >
> > jra
> >
> > Due to previous problems w/Join ( hangs ) the f
>
>
>
Author
16 May 2006 8:27 PM
Goran Sliskovic
Show quote
"Jrax" <J***@discussions.microsoft.com> wrote in message
news:F9D3F315-5ED6-4415-833D-12C249A91044@microsoft.com...
> Hi,
>
> Wondering if anyone would know if behavoir we are seeing w/Join method is
> expected.
>
> We are seeing the Join method time out on a background thread after 5
> seconds.
>
> When we call Join ( from UI thread ) we know that the background thread
> has
> already exited its while loop and should be ready to fall out of its
> thread
> proc.
>
> When we timeout from Join we see that the thread we want to join to is
> still
> running and alive.
>
> When Join is called the thread priority of the background thread is
> somethings below normal and sometimes above normal ( toggled by another
> thread ).  We see the join timeout for both cases above.
>
> Thanx
....

What triggers join on thread? Event raised by exiting thread?

Goran

AddThis Social Bookmark Button