Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit31a6cbf

Browse files
committed
FX_NO_TASK --- dead code
1 parentefa0c30 commit31a6cbf

File tree

2 files changed

+5
-22
lines changed

2 files changed

+5
-22
lines changed

‎src/fsharp/FSharp.Core/control.fs‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ namespace Microsoft.FSharp.Control
2525
openReflectionAdapters
2626
#endif
2727

28-
#if!FX_NO_TASK
2928
openSystem.Threading
3029
openSystem.Threading.Tasks
31-
#endif
3230

3331
#if FX_NO_OPERATION_CANCELLED
3432
typeOperationCanceledException(s: System.String)=
@@ -1021,7 +1019,6 @@ namespace Microsoft.FSharp.Control
10211019
letStartWithContinuations(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
10251022
typeVolatileBarrier()=
10261023
[<VolatileField>]
10271024
let mutableisStopped=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
11311125
lettoken= defaultArg cancellationToken defaultCancellationTokenSource.Token
11321126
CancellationTokenOps.Start(token, computation)
11331127

1134-
#if!FX_NO_TASK
11351128
static memberStartAsTask(computation,?taskCreationOptions,?cancellationToken)=
11361129
lettoken= defaultArg cancellationToken defaultCancellationTokenSource.Token
11371130
CancellationTokenOps.StartAsTask(token,computation,taskCreationOptions)
11381131

11391132
static memberStartChildAsTask(computation,?taskCreationOptions)=
11401133
async{let!token= getCancellationToken()
11411134
return CancellationTokenOps.StartAsTask(token,computation, taskCreationOptions)}
1142-
#endif
11431135

11441136
typeAsyncwith
11451137
static memberParallel(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
12621253
moduleTaskHelpers=
@@ -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
18271817
static memberTryCancelled(p:Async<'T>,f)=
18281818
whenCancelledA f p
18291819

1830-
#if!FX_NO_TASK
18311820
static memberAwaitTask(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

18421830
moduleCommonExtensions=
18431831

‎src/fsharp/FSharp.Core/control.fsi‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
namespaceMicrosoft.FSharp.Control
44

55
openSystem
6+
openSystem.Threading
7+
openSystem.Threading.Tasks
8+
openSystem.Runtime.CompilerServices
9+
610
openMicrosoft.FSharp.Core
711
openMicrosoft.FSharp.Core.Operators
812
openMicrosoft.FSharp.Control
913
openMicrosoft.FSharp.Collections
10-
openSystem.Threading
11-
#if!FX_NO_TASK
12-
openSystem.Runtime.CompilerServices
13-
openSystem.Threading.Tasks
14-
#endif
1514

1615
#if FX_NO_OPERATION_CANCELLED
1716

@@ -73,7 +72,6 @@ namespace Microsoft.FSharp.Control
7372
/// If one is not supplied, the default cancellation token is used.</param>
7473
static memberStart:computation:Async<unit>* ?cancellationToken:CancellationToken-> unit
7574

76-
#if!FX_NO_TASK
7775
///<summary>Executes a computation in the thread pool.</summary>
7876
///<remarks>If no cancellation token is provided then the default cancellation token is used.</remarks>
7977
///<returns>A<c>System.Threading.Tasks.Task</c> that will be completed
@@ -83,8 +81,7 @@ namespace Microsoft.FSharp.Control
8381

8482
///<summary>Creates an asynchronous computation which starts the given computation as a<c>System.Threading.Tasks.Task</c></summary>
8583
static member StartChildAsTask: computation:Async<'T>* ?taskCreationOptions:TaskCreationOptions-> Async<Task<'T>>
86-
#endif
87-
84+
8885
///<summary>Creates an asynchronous computation that executes<c>computation</c>.
8986
/// If this computation completes successfully then return<c>Choice1Of2</c> with the returned
9087
/// value. If this computation raises an exception before it completes then return<c>Choice2Of2</c>
@@ -256,14 +253,12 @@ namespace Microsoft.FSharp.Control
256253
/// <returns>An asynchronous computation that waits on the given <c>IAsyncResult</c>.</returns>
257254
static memberAwaitIAsyncResult:iar:System.IAsyncResult* ?millisecondsTimeout:int-> Async<bool>
258255

259-
#if!FX_NO_TASK
260256
/// Return an asynchronous computation that will wait for the given task to complete and return
261257
/// its result.
262258
static member AwaitTask: task: Task<'T>-> Async<'T>
263259
/// Return an asynchronous computation that will wait for the given task to complete and return
264260
/// its result.
265261
static member AwaitTask: task: Task-> Async<unit>
266-
#endif
267262

268263
///<summary>Creates an asynchronous computation that will sleep for the given time. This is scheduled
269264
/// using a System.Threading.Timer object. The operation will not block operating system threads

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp