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.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to