Since changes to the netcdf-c library appear to be slowing down for the moment,
I am going to create a PR that is an initial step to thread safety support.
Specifically, I am going to start collecting all global variables and computed
constants into a single file.
There are some complexities.
- Some global variables are used by all (or almost all) dispatchers.
These will need to be protected by a global mutex.
- Some global variables are used by only a single dispatcher.
Thread safe access to them will need to be done by that dispatcher's code.
- Computed constants will be initialized by a single initialization routine
that uses a separate mutex. Once these constants are initialized, they will
be accessible without any synchronization.
Since changes to the netcdf-c library appear to be slowing down for the moment,
I am going to create a PR that is an initial step to thread safety support.
Specifically, I am going to start collecting all global variables and computed
constants into a single file.
There are some complexities.
These will need to be protected by a global mutex.
Thread safe access to them will need to be done by that dispatcher's code.
that uses a separate mutex. Once these constants are initialized, they will
be accessible without any synchronization.