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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you experts, your comments helped me to understand better this subject.
Regards.
Regards.
ASKER
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.