On Mon, 15 May 2017, nore...@z505.com wrote:

On 2017-05-12 09:37, Michael Van Canneyt wrote:
Obviously "avoid threads where possible" but only if there is a simpler mechanism not reinventing a thread. So it seems to me onidle in fpgui is a simpler way than creating a new separate thread yourself, but how to do it in a program that has no fpgui onidle?

Check manually. What else is left ? There is no message queue, so no
loop in which to check at regular basis.


What's left is possibly something like apache 1.3 source code which somehow, AFAIR avoids using threads by using some other obscure strange thing, which I have forgotten. Possibly something like old dos programs used (sorry, not a Dos programmer, don't know.. not old enough).

They use select (or poll) and fork. So the equivalent of threads.
mpm = multi process module.

select is basically what peekmessage does.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to