提交 8bc11821 编写于 作者: K Kevin Ransom 提交者: Kevin Ransom (msft)

FX_NO_OPERATION_CANCELLED --- dead code removal

上级 96dd4843
......@@ -325,11 +325,7 @@ type AsyncModule() =
try
Async.RunSynchronously (go, cancellationToken = cts.Token)
with
#if FX_NO_OPERATION_CANCELLED
_ -> ()
#else
:? System.OperationCanceledException -> ()
#endif
Assert.AreEqual(1, !flag)
[<Test>]
......@@ -548,11 +544,7 @@ type AsyncModule() =
|> fun c -> Async.RunSynchronously(c, cancellationToken = cts.Token)
|> ignore
with
#if FX_NO_OPERATION_CANCELLED
_ -> ()
#else
:? System.OperationCanceledException -> () // OK
#endif
for _ in 1..1000 do test()
[<Test>]
......
......@@ -28,13 +28,6 @@ namespace Microsoft.FSharp.Control
#endif
#if FX_NO_OPERATION_CANCELLED
type OperationCanceledException(s : System.String) =
inherit System.Exception(s)
new () = new OperationCanceledException("The operation has been canceled")
#endif
/// We use our own internal implementation of queues to avoid a dependency on System.dll
type Queue<'T>() = //: IEnumerable<T>, ICollection, IEnumerable
......
......@@ -12,13 +12,6 @@ namespace Microsoft.FSharp.Control
open Microsoft.FSharp.Control
open Microsoft.FSharp.Collections
#if FX_NO_OPERATION_CANCELLED
type OperationCanceledException =
inherit System.Exception
new : System.String -> OperationCanceledException
#endif
/// <summary>A compositional asynchronous computation, which, when run, will eventually produce a value
/// of type T, or else raises an exception.</summary>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册