@@ -25,10 +25,8 @@ namespace Microsoft.FSharp.Control
2525open ReflectionAdapters
2626#endif
2727
28- #if ! FX_ NO_ TASK
2928open System.Threading
3029open System.Threading .Tasks
31- #endif
3230
3331#if FX_ NO_ OPERATION_ CANCELLED
3432type OperationCanceledException ( s : System.String ) =
@@ -1021,7 +1019,6 @@ namespace Microsoft.FSharp.Control
10211019let StartWithContinuations ( token : CancellationToken , a : Async < 'T >, cont , econt , ccont ) : unit =
10221020 startAsync token( cont>> fake) ( econt>> fake) ( ccont>> fake) a|> ignore
10231021
1024- #if ! FX_ NO_ TASK
10251022type VolatileBarrier () =
10261023[<VolatileField>]
10271024let mutable isStopped = false
@@ -1061,9 +1058,6 @@ namespace Microsoft.FSharp.Control
10611058}
10621059 Start( token, a)
10631060 task
1064-
1065- #endif
1066-
10671061
10681062[<Sealed>]
10691063[<CompiledName( " FSharpAsync" ) >]
@@ -1131,15 +1125,13 @@ namespace Microsoft.FSharp.Control
11311125let token = defaultArg cancellationToken defaultCancellationTokenSource.Token
11321126 CancellationTokenOps.Start( token, computation)
11331127
1134- #if ! FX_ NO_ TASK
11351128static member StartAsTask ( computation ,? taskCreationOptions ,? cancellationToken )=
11361129let token = defaultArg cancellationToken defaultCancellationTokenSource.Token
11371130 CancellationTokenOps.StartAsTask( token, computation, taskCreationOptions)
11381131
11391132static member StartChildAsTask ( computation ,? taskCreationOptions ) =
11401133async { let! token = getCancellationToken()
11411134return CancellationTokenOps.StartAsTask( token, computation, taskCreationOptions) }
1142- #endif
11431135
11441136type Async with
11451137static member Parallel ( l : seq < Async < 'T >>) =
@@ -1256,7 +1248,6 @@ namespace Microsoft.FSharp.Control
12561248
12571249 FakeUnit))
12581250
1259- #if ! FX_ NO_ TASK
12601251// Contains helpers that will attach continuation to the given task.
12611252// Should be invoked as a part of protectedPrimitive(withResync) call
12621253module TaskHelpers =
@@ -1289,7 +1280,6 @@ namespace Microsoft.FSharp.Control
12891280 args.cont())) |> unfake
12901281
12911282 task.ContinueWith( Action< Task>( continuation)) |> ignore|> fake
1292- #endif
12931283
12941284#if FX_ NO_ REGISTERED_ WAIT_ HANDLES
12951285[<Sealed>]
@@ -1827,7 +1817,6 @@ namespace Microsoft.FSharp.Control
18271817static member TryCancelled ( p : Async < 'T >, f ) =
18281818 whenCancelledA f p
18291819
1830- #if ! FX_ NO_ TASK
18311820static member AwaitTask ( task : Task < 'T >) : Async < 'T > =
18321821 protectedPrimitiveWithResync( fun args ->
18331822 TaskHelpers.continueWith( task, args, false )
@@ -1837,7 +1826,6 @@ namespace Microsoft.FSharp.Control
18371826 protectedPrimitiveWithResync( fun args ->
18381827 TaskHelpers.continueWithUnit( task, args, false )
18391828)
1840- #endif
18411829
18421830module CommonExtensions =
18431831