U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ MT-multithreading and servers » Deadlock - what LeaveGMutexAll does?
Re: Deadlock - what LeaveGMutexAll does? [message #35065 is a reply to message #35037] Sat, 07 January 2012 10:50 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Well, looks like classical deadlock... Wink

I guess for now the only thing to comment here is the purpose LeaveGMutexAll... "GMutex" (mutex for GUI) is designed to work recursively, means Lock/Unlock can be nested in single thread. GMutex keeps 'level' of those locks/unlocks.

Then in ICall we need to "completely unlock" GMutex, so that if called from another thread than non-main, main thread can lock GMutex regardless of how many times it was locked in that another thread. So LeaveGMutexAll unlocks 'level' times and returns level, so that after finishing the function in the main thread, it can be locked that many times again (and gui locking in other thread is not corrupted).
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Htmls / HtamlTag class and table generation
Next Topic: What is the status of IPv6 support?
Goto Forum:
  


Current Time: Sat Oct 03 12:35:32 GMT+2 2026

Total time taken to generate the page: 0.17802 seconds