Link to home
Start Free TrialLog in
Avatar of arturosm
arturosm

asked on

global variables multi-threading application

Hello experts.

I have a multi-threading Delphi application that uses some global variables but only for read-only purposes. The initial value of those global variables is set when the application starts and only the main thread is active. I have not had problems with my application so far but want to know if it is safe to read the value of global variables in a multi-threaded application and the reason why it is safe or not to access the global variables for reading their value.

Regards.
SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of arturosm
arturosm

ASKER

Thank you Geert_Gruwez.

I don´t know if this is another question, just that I don´t know much about critical sections, can you tell me more please, I'm asking for concepts more than for code.

Regards.

Thank you ewangoya.

Yes, they are strictly read only, basically they contain the value of paths to folders that the application uses for reading and writing files.

Regards.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you experts, your comments helped me to understand better this subject.

Regards.