Skip to content

Commit 88832db

Browse files
authored
ensuring monitor to let all other threads go (#66)
after the first metadata generation happens for an individual function no more blocking should happen and it's safe for all awaiting threads to be released.
1 parent f5020f3 commit 88832db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/isolated/Metadata/FunctionsAuthorizationMetadataMiddleware.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private async Task RegisterHttpTriggerAuthorizationAsync(FunctionContext context
5757
// is thread-safe on a per function basis.
5858
// Ensuring key is interned before entering monitor since key is compared as object
5959
var monitorKey = string.Intern($"famm:{context.FunctionId}");
60-
await KeyedMonitor.EnterAsync(monitorKey);
60+
await KeyedMonitor.EnterAsync(monitorKey, unblockOnFirstExit: true);
6161

6262
try
6363
{

0 commit comments

Comments
 (0)