Skip to content

Commit

Permalink
Clean up the mess...
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri Fontaine authored and Dimitri Fontaine committed Nov 6, 2012
1 parent a6ac18a commit 87e1d4f
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions go-hello-world.lisp
Expand Up @@ -5,15 +5,11 @@

(in-package #:go-hello-world)

(defvar *hello-world-kernel* nil
"The lparallel *kernel* we use in this package")

(defmacro with-temp-kernel ((nb-workers &key wait (name "hello-world"))
&body body)
"Execute BODY with a temporary lparallel *kernel*, then ends it."
`(progn
(setf *hello-world-kernel* (lp:make-kernel ,nb-workers :name ,name))
(let ((lp:*kernel* *hello-world-kernel*))
(let ((lp:*kernel* (lp:make-kernel ,nb-workers :name ,name)))
(unwind-protect
(progn ,@body)
(lp:end-kernel :wait ,wait)))))
Expand All @@ -25,11 +21,6 @@
(let ((,channel-name (lp:make-channel)))
,@body)))

(defun end-kernel (&key wait)
"End *hello-world-kernel*, for debugging purposes"
(let* ((lp:*kernel* *hello-world-kernel*))
(lp:end-kernel :wait wait)))

(defun say-hello (helloq worldq n)
(dotimes (i n)
(format t "Hello ")
Expand Down

0 comments on commit 87e1d4f

Please sign in to comment.