|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Unexpected behavoir from Thread.JoinWondering 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 <J***@discussions.microsoft.com> wrote:
> When we timeout from Join we see that the thread we want to join to is still What is it running when you break into it with the debugger?> running and alive. -- 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. -- Show quote________________________ 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 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 > > >
Show quote
"Jrax" <J***@discussions.microsoft.com> wrote in message What triggers join on thread? Event raised by exiting thread?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 .... Goran |
|||||||||||||||||||||||