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

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: 14291
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: Sat Jun 20 21:20:01 GMT+2 2026

Total time taken to generate the page: 0.00616 seconds