Lisp HUG Maillist Archive

No sleep after mp:initialize-multiprocessing

Hi All,

to track down a possible bug I wrote the folling:

(defun main ()
  (mp:initialize-multiprocessing "Test Sleep Process" nil 'jump-start))

(defvar *time* 0)

(defun jump-start ()
  (loop (format t "sleeping ~a ...~%" (incf *time*))
        (sleep 3)))

After delivery with

(deliver 'main "sleep.exe" 0
         :multiprocessing nil
         :console t)

the program works but there is not delay between each output line.

sleep doesn't sleep!

Is there anything wrong with my code? (I'd like to start multiprocessing after my real program already accomplished a few things).

Should I report this as a bug to Lispworks?


Andreas


AW: No sleep after mp:initialize-multiprocessing



> -----Ursprüngliche Nachricht-----
> Von: owner-lisp-hug@lispworks.com 
> [mailto:owner-lisp-hug@lispworks.com] Im Auftrag von Andreas Thiele
> Gesendet: Montag, 6. August 2007 16:19
> An: lisp-hug@lispworks.com
> Betreff: No sleep after mp:initialize-multiprocessing
> 
> 
> 
> Hi All,
> 
> to track down a possible bug I wrote the folling:
> 
> (defun main ()
>   (mp:initialize-multiprocessing "Test Sleep Process" nil 
> 'jump-start))
> 
> (defvar *time* 0)
> 
> (defun jump-start ()
>   (loop (format t "sleeping ~a ...~%" (incf *time*))
>         (sleep 3)))
> 
> After delivery with
> 
> (deliver 'main "sleep.exe" 0
>          :multiprocessing nil
>          :console t)
> 
> the program works but there is not delay between each output line.
> 
> sleep doesn't sleep!
> 
> Is there anything wrong with my code? (I'd like to start 
> multiprocessing after my real program already accomplished a 
> few things).
> 
> Should I report this as a bug to Lispworks?
> 
> 
> Andreas
> 

Although the case appears a bit strange, I found that I don't need dynamic 'switching from non mp environment to mp environment'.

Andreas


Updated at: 2020-12-10 08:45 UTC