Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style
  • Loading branch information
majocha committed Nov 18, 2024
commit 1611ab037d4d37e8121aabd29cd10ed9c75379e2
7 changes: 3 additions & 4 deletions src/Compiler/Facilities/AsyncMemoize.fs
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,12 @@ type internal AsyncMemoize<'TKey, 'TVersion, 'TValue when 'TKey: equality and 'T
let logger = CapturingDiagnosticsLogger "cache"
SetThreadDiagnosticsLoggerNoUnwind logger

try
let! result = computation
match! computation |> Async.Catch with
| Choice1Of2 result ->
log Finished key
Interlocked.Add(&duration, sw.ElapsedMilliseconds) |> ignore
return Result.Ok result, logger
with
| exn ->
| Choice2Of2 exn ->
log Failed key
return Result.Error exn, logger
}
Expand Down
Loading