D
Dave
Hello,
Suppose you have a class with a static property with only a get (read
only). You also have code in a static constructor that sets these
properties but takes 1 hour to run.
Now suppose the first request comes in at 11:00 am and tries to read
from this property. It will need to wait an hour until the page loads
which is fine and makes sense. If a second (different) request at
11:01 am comes in and tries to read the same property, will it wait
until the static constructor is finished? I'm hoping it does... If it
doesn't then the 2nd request will read dirty data from un-initialized
properties.
In my scenerio, the static constructor runs much quicker, but it's a
high traffic mission critical financial application that must read the
info each time correctly.
Thanks!
Dave
Suppose you have a class with a static property with only a get (read
only). You also have code in a static constructor that sets these
properties but takes 1 hour to run.
Now suppose the first request comes in at 11:00 am and tries to read
from this property. It will need to wait an hour until the page loads
which is fine and makes sense. If a second (different) request at
11:01 am comes in and tries to read the same property, will it wait
until the static constructor is finished? I'm hoping it does... If it
doesn't then the 2nd request will read dirty data from un-initialized
properties.
In my scenerio, the static constructor runs much quicker, but it's a
high traffic mission critical financial application that must read the
info each time correctly.
Thanks!
Dave