Skip to content

Commit d45a28e

Browse files
committed
Fix occasional deadlock due to interface range cache
1 parent facf5fc commit d45a28e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/parse/ParameterResolver.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class ParameterResolver {
2020
private readonly classLoader: ClassLoader;
2121
private readonly commentLoader: CommentLoader;
2222
private readonly ignoreClasses: Record<string, boolean>;
23-
private readonly cacheInterfaceRange: LRUCache<string, ParameterRangeResolved>;
23+
private readonly cacheInterfaceRange: LRUCache<string, Promise<ParameterRangeResolved>>;
2424

2525
public constructor(args: ParameterResolverArgs) {
2626
this.classLoader = args.classLoader;
@@ -266,7 +266,7 @@ export class ParameterResolver {
266266
* @param genericTypeRemappings A remapping of generic type names.
267267
* @param getNestedFields If Records and interfaces should produce nested field ranges.
268268
*/
269-
public async resolveRangeInterface(
269+
public resolveRangeInterface(
270270
interfaceName: string,
271271
qualifiedPath: string[] | undefined,
272272
genericTypeParameterInstances: ParameterRangeUnresolved[] | undefined,
@@ -278,7 +278,7 @@ export class ParameterResolver {
278278
const cacheKey = `${interfaceName}::${(qualifiedPath || []).join('.')}::${owningClass.fileName}`;
279279
let resolved = this.cacheInterfaceRange.get(cacheKey);
280280
if (!resolved) {
281-
resolved = await this.resolveRangeInterfaceInner(
281+
resolved = this.resolveRangeInterfaceInner(
282282
interfaceName,
283283
qualifiedPath,
284284
genericTypeParameterInstances,

0 commit comments

Comments
 (0)