Re: [ADVANCED-DOTNET] Monitor.TryEnter timeout strange behaviour

2003-07-18 Thread TIAGO PASCOAL (Interaction)
a-feira, 17 de Julho de 2003 20:52 > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Monitor.TryEnter timeout > strange behaviour > > > I have some test code below that illustrates how the TryEnter > and Exit work together. I have not seen or experienced the > be

Re: [ADVANCED-DOTNET] Monitor.TryEnter timeout strange behaviour

2003-07-17 Thread Chad M. Gross
I have some test code below that illustrates how the TryEnter and Exit work together. I have not seen or experienced the behavior you have explained. It sounds almost like you are not calling Monitor.Exit from thread A and thread B is timing out. To use the code below, create a new console appli

[ADVANCED-DOTNET] Monitor.TryEnter timeout strange behaviour

2003-07-17 Thread TIAGO PASCOAL (Interaction)
I'm using Monitor.TryEnter(object,int millisecondsTimeout) overload to wait for a lock for no more than X amount of time. Now I'm getting a strange behaviour. >From what I understand from the specification using this overload I would get the same behaviour as using the lock keyword (C#) but on wa