[fpc-devel] TThread.RemoveQueuedEvents

Ondrej Pokorny lazarus at kluug.net
Fri Sep 25 13:03:11 CEST 2020


On 25.09.2020 03:30, Martin via fpc-devel wrote:
> Wath is in the following indented?
>
> The doc says 
> https://www.freepascal.org/docs-html/rtl/classes/tthread.removequeuedevents.html
>> all calls to the given method .... are removed. 
>
> However there may be more than one way to read this.
>
> aMethod: TThreadMethod 
> <https://www.freepascal.org/docs-html/rtl/classes/tthreadmethod.html>
> is "procedure of object"
>
> The method "aMethod" (which is what is given) therefore consists of 
> proc-address and instance-address.
>
> However the code actually removes all methods at proc-address, 
> regardless of the instance.
>
> Does the "given method" mean:
> 1) "aMethod" as passed in as parameter, consisting of proc and instance
> 2) "method of the class" extracted from "aMethod"

It's a Delphi-compatibility method: 
http://docwiki.embarcadero.com/Libraries/Sydney/en/System.Classes.TThread.RemoveQueuedEvents

The Delphi docs are not much more help here but FPC should have the same 
behavior. Please check the Delphi behavior and clarify the docs.

Thanks, Ondrej

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200925/7b008795/attachment.htm>


More information about the fpc-devel mailing list