[fpc-pascal] fcl-web: Trequest.RemoteAddr is empty (sometimes)
Luca Olivetti
luca at ventoso.org
Tue Jan 12 10:56:28 CET 2021
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"?
> For safety, I would Nil the FCommandQueue
> after
> assigning it to locCommandQueue.
No need, it's only used as a return value from the synchronized method.
[*] sorry for the "it's" in the original sentence
Bye
--
Luca
More information about the fpc-pascal
mailing list