Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 14265
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 Jul 05 12:16:45 CEST 2025

Total time taken to generate the page: 0.03352 seconds