Link to home
Start Free TrialLog in
Avatar of mparavas
mparavas

asked on

Semaphores

I have an application where two CallBacks access a single
resource. I am told that I can use the initialize the Class
CSemaphore and then call CSingleLock::Lock at the beginning and CSingleLock::UnLock  at the end of both CallBacks. Is this true? How do I instantiate and use these functions.
IF this is the correct approach, can some one show me the
4 or 5 lines of code that initializes the CSemaphore,
and calls Lock and Unlock functions? Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mparavas
mparavas

ASKER

Excellent idea. It worked great. Thanks a lot.