(from MSDN)
lock ensures that one thread does not enter a critical section while another
thread is in the critical section of code. If another thread attempts to
enter a locked code, it will wait (block) until the object is released.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.