[fpc-devel] Threads and alot of crap continued

Micha Nelissen micha at neli.hopto.org
Wed Nov 8 17:08:38 CET 2006

Vinzent Hoefler wrote:
> The answer to my "I always thought a timer is more comparable to an 
> interrupt or signal than a polling loop." was "That is a very common 
> misconception." which I still refuse as being a correct answer.

The irony is of course that you clamp to your interrupt definition, but 
still implement your log timed event with a loop :-).

> Especially outside of the usual GUI-application, we seemed to be talking 
> about, because the user/programmer somehow has to make sure that the 
> polling is actually done some time in the future.
> Considering that a simply "ReadLn" can block indefinitely already, this 
> is quite hard to accomplish then, isn't it?

Well, readln is used in the trivial (T)UIs; TUIs/GUIs are usually 
event-driven, like networked apps also can be. A Timer fits in a 
event-driven app just fine, and then a timer doesn't interrupt anything 
anymore; but your intuition may say that it should, that's why it's a 
common misconception.


More information about the fpc-devel mailing list