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 » Community » Newbie corner » WhenAction() -> ProcessEvents() -> WhenAction() -> hang, crash :-) (I'm probably stretching reentrancy of the GUI callbacks too far)
Re: WhenAction() -> ProcessEvents() -> WhenAction() -> hang, crash :-) [message #52839 is a reply to message #52838] Mon, 09 December 2019 08:55 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
- latch should work. I am doing that approach all the time. "REENTRANT" is irrelevant, reentrant code always works (there is a lot of reentrancy everywhere in U++)
- from user perspective, you should also disable the button and reenable at the end of task, but I recommend to keep latch (I call them "lock") anyway
- I usually make lock as counter
- From what you wrote (maybe I have missread), you are not running that task as background thread. In that case, Mutex is not likely to help you.

In short: latch/lock should work, if it does not, look for problem elsewhere.

Posting testcase would help Smile
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [solved] Register a callback on "when window resized" ?
Next Topic: CryptoCurrency wallets
Goto Forum:
  


Current Time: Thu Apr 25 18:39:47 CEST 2024

Total time taken to generate the page: 0.02386 seconds