It means that in this method you perform small steps everytime your application hasn't got anything else to do. It makes a loop like this:
|
Source code
|
1
2
3
4
|
while(1){
while(event queue not empty) processEventFromQueue();
performOneStepOfYourHeavyWork();
}
|
The modern way of doing the same thing is to divide the application into two independant parts (threads) -- one of them is taking care of events, and the other performs your work without caring about the other thread:
|
Source code
|
1
2
3
4
5
6
7
8
9
|
// thread one ("GUI thread"):
while(1){
if(event queue not empty) processEventFromQueue();
}
//thread two ("Worker thread"):
while(1){
performOneStepOfYourHeavyWork();
}
|
This way the operating system (or rather the threading scheduler to be precise) makes sure both threads get executed when the CPU hasn't got anything else to do (more or less).
If you don't know what it all means, then you probably don't need it at all.