Re: Semaphores in Delphi



Rob Kennedy wrote:
Locke wrote:
I'm trying to implement a simple semaphore to protect critical sections of code with the following procedures.

Then why don't you just use a critical section or a semaphore? Why invent your own?

Read about EnterCriticalSection and CreateSemaphore.


Thanks, EnterCriticalSection and LeaveCriticalSection do just what I'm looking for.
.