MailboxProcessor und Ausnahmen

Ich wundere mich warumMailboxProcessorDie Standardstrategie für die Behandlung von Ausnahmen ist gerechtim stillen ignorieren Sie. Zum Beispiel:

let counter =
    MailboxProcessor.Start(fun inbox ->
        let rec loop() =
            async { printfn "waiting for data..."
                    let! data = inbox.Receive()
                    failwith "fail" // simulate throwing of an exception
                    printfn "Got: %d" data
                    return! loop()
            }
        loop ())
()
counter.Post(42)
counter.Post(43)
counter.Post(44)
Async.Sleep 1000 |> Async.RunSynchronously

und nichts passiert. Es gibt keinen schwerwiegenden Stopp der Programmausführung oder ein Meldungsfeld mit der Meldung "Eine nicht behandelte Ausnahme". Nichts.

Diese Situation wird schlimmer, wenn jemand verwendetPostAndReply Methode: ein garantierter Deadlock als Ergebnis.

Gründe für ein solches Verhalten?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage