[fpc-pascal] Best way to check SimpleIPC for messages

noreply at z505.com noreply at z505.com
Mon May 15 23:56:24 CEST 2017


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).

Quote from some slashdot comment:
"There is an Apache2 mpm, called "prefork", which isn't threaded and 
basically makes Apache2 look like Apache1. But hey, we have a very good 
server already that looks like Apache1."

Some people have magically figured out how to avoid threads using 
possibly bizarre techniques..

Quote " It handles requests in a manner similar to Apache 1.3. It is 
appropriate for sites that need to avoid threading for compatibility 
with non-thread-safe libraries. It is also the best MPM for isolating 
each request, so that a problem with a single request will not affect 
any other."

I looked into the apache 1.3 sources before to figure out what they 
used, but long forgotten now.



More information about the fpc-pascal mailing list