File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ namespace FSharp.Compiler.Diagnostics
44
55open System
66open System.Diagnostics
7+ open Internal.Utilities .Library
78
89[<RequireQualifiedAccess>]
910module Activity =
@@ -12,12 +13,14 @@ module Activity =
1213 let private activitySource = new ActivitySource( activitySourceName)
1314
1415 let start name ( tags : ( string * string ) seq ) : IDisposable =
15- match activitySource.StartActivity( name) |> Option.ofObj with
16- | Some activity ->
16+ let activity = activitySource.StartActivity( name)
17+
18+ match activity with
19+ | null -> ()
20+ | activity ->
1721 for key, value in tags do
1822 activity.AddTag( key, value) |> ignore
1923
20- activity :> IDisposable
21- | None -> null
24+ activity
2225
2326 let startNoTags name : IDisposable = activitySource.StartActivity( name)
Original file line number Diff line number Diff line change @@ -997,7 +997,7 @@ type CancellableBuilder() =
997997
998998 match compRes with
999999 | ValueOrCancelled.Value res ->
1000- ( resource :> IDisposable ) . Dispose()
1000+ Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions. Dispose resource
10011001
10021002 match res with
10031003 | Choice1Of2 r -> ValueOrCancelled.Value r
You can’t perform that action at this time.
0 commit comments