Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2022-09

reading a TFPGMap from several threads

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luca Olivetti

Hello,

I have a couple of TFPGMaps that I populate once and never change. Is it safe to read them (i.e. use Find and Data[]) from different threads? I'd avoid using a critical section if not absolutely necessary.

Bye

Luca

Reply by email

Sven Barth
to Luca Olivetti

Luca Olivetti via fpc-pascal schrieb am
Mi., 7. Sep. 2022, 13:01:

Show quoted text 6 lines
Hello, I have a couple of TFPGMaps that I populate once and never change. Is it safe to read them (i.e. use Find and Data[]) from different threads? I'd avoid using a critical section if not absolutely necessary.

I'd say that this should be safe indeed.

Regards,
Sven

Reply by email

Luca Olivetti
to Sven Barth

El 7/9/22 a les 14:12, Sven Barth via fpc-pascal ha escrit:

Show quoted text 13 lines
Luca Olivetti via fpc-pascal < > schrieb am Mi., 7. Sep. 2022, 13:01: Hello, I have a couple of TFPGMaps that I populate once and never change. Is it safe to read them (i.e. use Find and Data[]) from different threads? I'd avoid using a critical section if not absolutely necessary. I'd say that this should be safe indeed.

Ok, thank you.

Bye

Luca

Reply by email