@@ -9,7 +9,7 @@ import { IKeyValueAdapter } from "./IKeyValueAdapter.js";
99import { JsonKeyValueAdapter } from "./JsonKeyValueAdapter.js" ;
1010import { DEFAULT_REFRESH_INTERVAL_IN_MS , MIN_REFRESH_INTERVAL_IN_MS } from "./RefreshOptions.js" ;
1111import { Disposable } from "./common/disposable.js" ;
12- import { Lock } from "./common/lock .js" ;
12+ import { ExclusiveExecutor } from "./common/mutex .js" ;
1313import { FEATURE_FLAGS_KEY_NAME , FEATURE_MANAGEMENT_KEY_NAME } from "./featureManagement/constants.js" ;
1414import { AzureKeyVaultKeyValueAdapter } from "./keyvault/AzureKeyVaultKeyValueAdapter.js" ;
1515import { RefreshTimer } from "./refresh/RefreshTimer.js" ;
@@ -41,7 +41,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
4141 #isInitialLoadCompleted: boolean = false ;
4242
4343 // Refresh
44- #refreshLock: Lock = new Lock ( ) ; // lock to prevent "concurrent" async refresh
44+ #refreshExecutor: ExclusiveExecutor = new ExclusiveExecutor ( ) ;
4545
4646 #refreshInterval: number = DEFAULT_REFRESH_INTERVAL_IN_MS ;
4747 #onRefreshListeners: Array < ( ) => any > = [ ] ;
@@ -353,7 +353,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
353353 throw new Error ( "Refresh is not enabled for key-values or feature flags." ) ;
354354 }
355355
356- await this . #refreshLock . execute ( this . #refreshTasks. bind ( this ) ) ;
356+ await this . #refreshExecutor . execute ( this . #refreshTasks. bind ( this ) ) ;
357357 }
358358
359359 async #refreshTasks( ) : Promise < void > {
0 commit comments