 
 
 (defn launch-some-workers
-  [interpreter bindings numbered-programs]
-  (doall
-    (cp/upmap 2
-      #(.write *out*
-        (str "\n\n"
-          (first %) ": "
-          (interpreter-details
-            (run-program-in-standardized-interpreter
-              interpreter
-              (second %)
-              bindings))))
-      numbered-programs)
-      ))
+  [interpreter bindings how-many]
+  (cp/with-shutdown! [net-pool (cp/threadpool 100)]
+    (doall
+      (lazy/upmap net-pool
+        #(.write *out*
+          (str "\n\n"
+            (first %) ": "
+            (interpreter-details
+              (run-program-in-standardized-interpreter
+                interpreter
+                (second %)
+                bindings))))
+        (map sample-program (range how-many))
+        ))))
 
 
 (fact "run some workers in parallel"


;; setup for stress test

(def sample-programs
  (map-indexed
    (fn [idx p] [idx p])
    (take
      cohort-size
      (repeatedly
        #(util/some-program
          program-size
          erc-scale
          erc-prob
          my-interpreter)))))


(def sample-bindings

        :bindings bindings}
        )))


(with-handler! #'run-program-in-standardized-interpreter
  "If an interpreter raises an exception, dump a new prisoner file."
