mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-09-21 10:18:23 +03:00
Increase timings of concurrency tests due to flaky windows runs
This commit is contained in:
parent
1dba32a0c4
commit
87358f19da
@ -11,11 +11,11 @@ constant = do
|
||||
let a = await $ fork "String"
|
||||
putStrLn a
|
||||
|
||||
-- Issue related to usleep in MacOS brew sleep
|
||||
-- Issue related to usleep in MacOS brew chez
|
||||
macsleep : (us : Int) -> So (us >= 0) => IO ()
|
||||
macsleep us =
|
||||
if (os == "darwin")
|
||||
then sleep (us `div` 1000)
|
||||
then sleep (us `div` 10000)
|
||||
else usleep us
|
||||
|
||||
partial
|
||||
@ -28,7 +28,7 @@ futureHelloWorld (us, n) with (choose (us >= 0))
|
||||
partial
|
||||
simpleIO : IO (List Unit)
|
||||
simpleIO = do
|
||||
futures <- sequence $ futureHelloWorld <$> [(3000, "World"), (1000, "Bar"), (0, "Foo"), (2000, "Idris")]
|
||||
futures <- sequence $ futureHelloWorld <$> [(30000, "World"), (10000, "Bar"), (0, "Foo"), (20000, "Idris")]
|
||||
let awaited = await <$> futures
|
||||
pure awaited
|
||||
|
||||
@ -40,16 +40,16 @@ erasureAndNonbindTest = do
|
||||
_ <- forkIO $ do
|
||||
putStrLn "This line is printed"
|
||||
notUsed <- forkIO $ do
|
||||
macsleep 1000
|
||||
macsleep 10000
|
||||
putStrLn "This line is also printed"
|
||||
let _ = nonbind
|
||||
let n = nonbind
|
||||
macsleep 2000 -- Even if not explicitly awaited, we should let threads finish before exiting
|
||||
macsleep 20000 -- Even if not explicitly awaited, we should let threads finish before exiting
|
||||
|
||||
map : IO ()
|
||||
map = do
|
||||
future1 <- forkIO $ do
|
||||
macsleep 1000
|
||||
macsleep 10000
|
||||
putStrLn "#2"
|
||||
let future3 = map (const "#3") future1
|
||||
future2 <- forkIO $ do
|
||||
|
Loading…
Reference in New Issue
Block a user