[fpc-pascal] fcl-web: Trequest.RemoteAddr is empty (sometimes)

Michael Van Canneyt michael at freepascal.org
Tue Jan 12 11:01:43 CET 2021



On Tue, 12 Jan 2021, Luca Olivetti via fpc-pascal wrote:

> El 12/1/21 a les 10:24, Michael Van Canneyt via fpc-pascal ha escrit:
>
>>>
>>> Am I right thinking that, even if several copies of the above method 
>>> are running, each will get it's own local variables, so the 
>>> LocCommandQueue variable (as well as the other locals) won't be 
>>> clobbered by another copy?
>>> Or should I declare them as threadvar?
>> 
>> If FCommandQueue is the only thing that is set during SyncNewConnection
>> based on TRequest, then yes.
>
> yes to "each will get its [*] own local" or yes to "should I declare 
> them as threadvar"?

Yes to "each will get its own local copy".
I don't think threadvars are needed here.

Michael.


More information about the fpc-pascal mailing list