Unexpected behavoir from Thread.Join

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Jrax said:
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
 
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
 
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

Alvin Bruney said:
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 said:
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
 
Jrax said:
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
 
Back
Top