Other Server Global Data

rondunn

Member
Licensed User
Longtime User
I'm writing a server application which uses some common data for each call.

This data takes a very long time to load, and can't be loaded for each call. The data is read-only.

How do I pass a reference to this data to a server thread, or access that data from within the thread?
 

Roycefer

Well-Known Member
Licensed User
Longtime User
Just store it in a global variable (probably one of the collections will do nicely) declared in Main. Make sure it's Public. It can be accessed from any module. Since you're only reading from this data, you don't have to worry about concurrency issues.
 
Upvote 0

rondunn

Member
Licensed User
Longtime User
As simple as that? Gee, I feel stupid for looking for something more complex.

Thank you, Roycefer.
 
Upvote 0
Top