|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by IPA_tech in Windows MFC Programming, Microsoft Visual C++
Hi,
In my client server application, I am using CMutex and CSingleLock to lock the shared resource in multithreaded environment. I am calling Lock/UnLock functions accordingly. This shared memory is a list of all the clients logged in.
Sometimes at customer site, this list(shared memory) is not released by thread and other threads wait for longer time. Some waiting threads have to wait for very longer. This is very random and I am not able to re produce it in my debugger.
I want to make sure that if a currently running thread locks a shared resource for longer period then this current running thread should release(unlock) the resource for other waiting threads. I could not able to find how I can set the timer for the resource to be released from a thread after x time.
Please help.
Cheers
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625