Async.TryCancelled doesn't work with Async.RunSynchronously
问题 I try to create an agent that updates UI based on user interaction. If user clicks on a button, the GUI should be refreshed. The preparation of model takes a long time, so it is desirable that if user clicks on other button, the preparation is cancelled and the new one is started. What I have so far: open System.Threading type private RefreshMsg = | RefreshMsg of AsyncReplyChannel<CancellationTokenSource> type RefresherAgent() = let mutable cancel : CancellationTokenSource = null let