[fpc-devel] request for a small but important addition to the docs

Luca Olivetti luca at ventoso.org
Wed Sep 18 12:11:20 CEST 2013


Al 18/09/13 11:55, En/na Luca Olivetti ha escrit:
> Al 18/09/13 10:08, En/na Michael Schnell ha escrit:
>>
>> sorry I forgot:
>>
>> *If the event queue is empty, **CheckSynchronize w**aits for an event to
>> be pushed by a TThread or for /timeout/ Milliseconds to pass. If timeout
>> is 0, it waits forever.*
> 
> If timeout is 0 it won't wait at all:
> 
>         if timeout>0 then
>           begin
>             RtlEventWaitFor(SynchronizeTimeoutEvent,timeout);
>           end
>          else
>            RtlEventResetEvent(SynchronizeTimeoutEvent);


BTW, while I agree that there's no substitute for good documentation,
when you have the source you can easily solve your doubts about some
implementation details.
With lazarus it's even easier:

1) Project->New project->Application
2) double click on the newly created form
3) in the event that 3) creates type "CheckSynchronize"
4) Put your mouse over "CheckSynchronize", press CTRL and click. This
will lead to the declaration of "CheckSynchronize"
5) From there, press CTRL+SHIFT+DOWN (i.e.arrow down) and you can see
the implementation
6) Rinse and repeat for every call you have some doubts about, to
backtrack you can use CTRL+H

Bye
-- 
Luca



More information about the fpc-devel mailing list