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++ Library : Other (not classified elsewhere) » "DoEvents" or "wxSafeYield" equivalent in Upp++
"DoEvents" or "wxSafeYield" equivalent in Upp++ [message #17844] Sun, 31 August 2008 02:09 Go to previous message
koldo is currently offline  koldo
Messages: 3359
Registered: August 2008
Senior Veteran
Hello all

I would like to use some kind of "poor man" multithreading for long "for" loops. Like:
for (int i = 0; i < MANY_LOOPS; ++i) {
  ThingsToDo();
  DoEvents();
}

where DoEvents() lets some kind of "cooperative multitasking" by:
- disabling the user input to all program windows
- asking the Upp++ main loop to handle the pending messages in the windowing system
- re-enabling it again afterwards

Disabling user input would avoid unwanted reentrance of code.

In this moment this will be enough for me and much easier to handle than real multitasking with the gui.

Best regards


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: selected text in other application
Next Topic: U++ suggestions
Goto Forum:
  


Current Time: Sat May 04 20:06:04 CEST 2024

Total time taken to generate the page: 0.01697 seconds