> > Yes, sounds like you have.
>
> Excellent. Is there any way I can test this?

Yeah, with a similar pseudo-code:

 thread1()
 {
  print 'before lock - 1';
  cs.Lock();
  print 'after lock - 1';
  Sleep( 10 * 1000 );
  print 'after sleep - 1';
  cs.Unlock();
  print 'unlocked - 1';
 }
 thread2()
 {
  print 'before lock - 2';
  cs.Lock();
  print 'after lock - 2';
  Sleep( 10 * 1000 );
  print 'after sleep - 2';
  cs.Unlock();
  print 'unlocked - 2';
 }

Start both threads right after each other, and watch the speed of the output
(note the 10 sec pauses.)


-------------
Ehsan Akhgari

Farda Technology (http://www.farda-tech.com/)

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]

Do ever what you will - but first be such as can will.
-Thus Spoke Zarathustra, F. W. Nietzsche





Reply via email to