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 » Code before Thread.Run() nor executed
Re: Code before Thread.Run() nor executed [message #48725 is a reply to message #48724] Tue, 29 August 2017 20:26 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
rafiwui wrote on Tue, 29 August 2017 18:21
And how can I unlock it inside the function?


Put it into the block.

{
GuiLock __;
do something
} // destructor unlocks

Alternatively, GuiLock is really simple:

struct GuiLock {
	GuiLock()  { EnterGuiMutex(); }
	~GuiLock() { LeaveGuiMutex(); }
};


You can call EnterGuiMutex() / LeaveGuiMutex() directly too...

BTW, note that "__" is my way of saying "name does not matter".

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to use TLS over SMTP
Next Topic: HttpRequest ignores server errors
Goto Forum:
  


Current Time: Fri Apr 26 10:52:40 CEST 2024

Total time taken to generate the page: 0.05257 seconds