0 | module Evince.Async.Posix
2 | import public Evince.Async.Synchronized
3 | import public Evince.Async.Hoist
4 | import public Evince.Async.Shared
10 | import IO.Async.Loop.Posix
18 | posixRun : Async Poll [] () -> IO ()
20 | Nothing <- getEnv "IDRIS2_ASYNC_THREADS"
21 | | Just _ => simpleApp prog
22 | cores <- getNProcessors
23 | ignore $
setEnv "IDRIS2_ASYNC_THREADS" (show (fromMaybe 2 cores)) True
35 | runSpecAsyncWith : RunConfig -> Spec (Async Poll []) () () -> IO ()
36 | runSpecAsyncWith = runSpecVia posixRun
40 | runSpecAsync : Spec (Async Poll []) () () -> IO ()
41 | runSpecAsync = runSpecAsyncWith defaultConfig
46 | runSpecAsyncWithSummaryAndConfig : RunConfig -> Spec (Async Poll []) () () -> IO Summary
47 | runSpecAsyncWithSummaryAndConfig = summaryVia posixRun
51 | runSpecAsyncWithSummary : Spec (Async Poll []) () () -> IO Summary
52 | runSpecAsyncWithSummary = runSpecAsyncWithSummaryAndConfig defaultConfig
56 | runSpecAsyncWithArgs : Spec (Async Poll []) () () -> IO ()
57 | runSpecAsyncWithArgs = runSpecArgsVia posixRun
61 | runSpecAsyncFailFast : Spec (Async Poll []) () () -> IO ()
62 | runSpecAsyncFailFast = runSpecFailFastVia posixRun
66 | runSpecAsyncTimed : Spec (Async Poll []) () () -> IO ()
67 | runSpecAsyncTimed = runSpecTimedVia posixRun
72 | runSpecAsyncIO : Spec IO () () -> IO ()
73 | runSpecAsyncIO = runSpecAsync . hoistSpec liftIO
77 | runSpecAsyncIOWith : RunConfig -> Spec IO () () -> IO ()
78 | runSpecAsyncIOWith cfg = runSpecAsyncWith cfg . hoistSpec liftIO