external-process: use locks only when threads are enabled

This commit is contained in:
Daniel Kochmanski 2017-10-09 09:38:26 +02:00
parent 3d7f68445b
commit b00b15b078

View file

@ -8,8 +8,8 @@
(in-package "EXT")
(defmacro with-process-lock ((process) &body body)
`(mp:with-lock ((external-process-%lock process))
,@body))
#+threads `(mp:with-lock ((external-process-%lock process)) ,@body)
#-threads `(progn ,@body))
(defstruct (external-process (:constructor make-external-process ()))
pid
@ -18,7 +18,7 @@
error-stream
(%status :running)
(%code nil)
(%lock (mp:make-lock))
#+threads (%lock (mp:make-lock))
#+threads (%pipe (mp:make-process)))
(defun external-process-status (external-process)