File tree Expand file tree Collapse file tree
tests/fable/FSharp.Control.AsyncSeq.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ open FSharp.Control
88open System
99
1010type AsyncOps = AsyncOps with
11- static member unit : Async < unit > = async { return () }
1211 static member never = async { do ! Async.Sleep(- 1 ) }
1312 static member timeoutMs ( timeoutMs : int ) ( a : Async < 'a >) =
1413 async {
@@ -27,18 +26,6 @@ module AsyncSeq =
2726
2827let [<Literal>] DEFAULT_TIMEOUT_MS = 2000
2928
30- let randomDelayMs ( minMs : int ) ( maxMs : int ) ( s : AsyncSeq < 'a >) =
31- let rand = new Random( int DateTime.Now.Ticks)
32- let randSleep = async { do ! Async.Sleep( rand.Next( minMs, maxMs)) }
33-
34- AsyncSeq.zipWith ( fun _ a -> a) ( AsyncSeq.replicateInfiniteAsync randSleep) s
35-
36- let randomDelayDefault ( s : AsyncSeq < 'a >) =
37- randomDelayMs 0 50 s
38-
39- let randomDelayMax m ( s : AsyncSeq < 'a >) =
40- randomDelayMs 0 m s
41-
4229let catch ( f : unit -> 'b ) : Choice < 'b , exn > =
4330 try f() |> Choice1Of2
4431 with ex -> ex |> Choice2Of2
You can’t perform that action at this time.
0 commit comments