Skip to content

Commit

Permalink
nullify disposed waithandle
Browse files Browse the repository at this point in the history
  • Loading branch information
majocha committed Oct 24, 2024
1 parent 8b0900c commit 610ed21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/FSharp.Core/mailbox.fs
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,11 @@ type Mailbox<'Msg>(cancellationSupported: bool, isThrowExceptionAfterDisposed: b
inboxStore.Clear()

arrivals.Clear()
isDisposed <- true)
isDisposed <- true

if isNotNull pulse then
(pulse :> IDisposable).Dispose()
if isNotNull pulse then
(pulse :> IDisposable).Dispose()
pulse <- null)

#if DEBUG
member x.UnsafeContents = (x.inbox, arrivals, pulse, savedCont) |> box
Expand Down

0 comments on commit 610ed21

Please sign in to comment.