[Lazarus] sleep function don't passed before executing the next statement

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Nov 21 11:43:49 CET 2012


Mark Morgan Lloyd schrieb:
> Michael Schnell wrote:

>> (Same is true for any "busy wait" polling loops in the main thread and 
>> "busy wait" polling loops without sleep in worker threads.)
> 
> Also much database stuff in my experience. *Anything* which doesn't 
> return immediately is very bad news from a usability POV.

IMO there is no strict borderline between possibly lengthy operations, 
from loading an file into memory up to loading a complex database query 
result. When the user cannot proceed unless the operation has finished, 
the GUI can wait that time, too.

That's different from true background operations, found in most IDE's. 
An IDE can load and parse related files in the background, or scan the 
current file after each keystroke. These tasks certainly must not block 
any user actions, and consequently should be moved into threads.

DoDi





More information about the Lazarus mailing list