diff options
Diffstat (limited to 'stdlib/source/lux/concurrency/process.lux')
-rw-r--r-- | stdlib/source/lux/concurrency/process.lux | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/stdlib/source/lux/concurrency/process.lux b/stdlib/source/lux/concurrency/process.lux index c2b519fb4..a67734747 100644 --- a/stdlib/source/lux/concurrency/process.lux +++ b/stdlib/source/lux/concurrency/process.lux @@ -34,7 +34,8 @@ (import: java/util/concurrent/ScheduledThreadPoolExecutor (new [int]) (schedule [Runnable long TimeUnit] #io (ScheduledFuture Object))))} - + + ## Default (type: Process {#creation Nat #delay Nat @@ -47,12 +48,15 @@ (|> (Runtime::getRuntime) (Runtime::availableProcessors) .nat)} + + ## Default 1))) (def: runner (`` (for {(~~ (static host.jvm)) (ScheduledThreadPoolExecutor::new (.int ..parallelism))} + ## Default (: (Atom (List Process)) (atom.atom (list)))))) @@ -67,6 +71,8 @@ 0 (Executor::execute runnable runner) _ (ScheduledThreadPoolExecutor::schedule runnable (.int milli-seconds) TimeUnit::MILLISECONDS runner)))} + + ## Default (atom.update (|>> (#.Cons {#creation ("lux io current-time") #delay milli-seconds #action action})) @@ -74,6 +80,8 @@ (`` (for {(~~ (static host.jvm)) (as-is)} + + ## Default (as-is (exception: #export (cannot-continue-running-processes) "") (def: #export run! |