|
|
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  |
 |
koldo
Messages: 3432 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
|
|
|
|
|
|
Goto Forum:
Current Time: Sun Apr 27 22:17:03 CEST 2025
Total time taken to generate the page: 0.01167 seconds
|
|
|