mp:process-run-function may runs function twice
CL-USER> (ql:quickload :zacl)
CL-USER> (defvar *a* 0)
CL-USER> (defvar *m* (sb-thread:make-mutex))
CL-USER> (progn (setq *a* 0)
(dotimes (x 100)
(mp:process-run-function nil (lambda () (sb-thread:with-mutex (*m*)
(incf *a*)))))
*a*)
107
it should be 100, or not?
(maybe-start) has check-then-do code:
(unless (thread process)
...
but this code is not thread safe.