Handling Race Conditions in IOptionsMonitor When T Depends on Other Options in .NET Core
I’m using IOptionsMonitor where T is dependent on other options in my service. There seems to be a race condition when using the OnChange event because the IOptions are initialized asynchronously on Reload, leading to T being initialized before the dependent options. This causes old values to appear in the OnChange event.