[fpc-pascal] Best way to check SimpleIPC for messages
Michael Van Canneyt
michael at freepascal.org
Tue May 16 07:30:02 CEST 2017
On Mon, 15 May 2017, noreply at 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.
More information about the fpc-pascal
mailing list