How to use EnterCriticalSection and LeaveCriticalSection in C#?

  • Thread starter Thread starter afatdog
  • Start date Start date
A

afatdog

How to use EnterCriticalSection and LeaveCriticalSection in C#?
How to define CRITICAL_SECTION?
 
You might want to look at the lock statement too.

(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.


--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Read my Blog at http://bobpowelldotnet.blogspot.com
 
Back
Top