Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
2
Task/Fork/Clojure/fork-1.clj
Normal file
2
Task/Fork/Clojure/fork-1.clj
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(require '[clojure.java.shell :as shell])
|
||||
(shell/sh "echo" "foo") ; evaluates to {:exit 0, :out "foo\n", :err ""}
|
||||
7
Task/Fork/Clojure/fork-2.clj
Normal file
7
Task/Fork/Clojure/fork-2.clj
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(let [search (future (shell/sh "find" "." "-name" "needle.*" :dir haystack))]
|
||||
(while (and (other-stuff-to-do?) (not (future-done? search)))
|
||||
(do-other-stuff))
|
||||
(let [{:keys [exit out err]} @search]
|
||||
(if (zero? exit)
|
||||
(do-something-with out)
|
||||
(report-errors-in err))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue