Studying the implementation of 'later, I'm curious as to why the pipe is
run inside a 'task. I've tested it and it works just fine without the task.

My guess is that it allows for parallel processes. Programs inside *Run are
run independently of the sequence of the main program. If it was run
without 'task, the child would have to return a value before the parent
could continue execution. This would defeat the purpose of using 'later to
spawn child processes that can run in parallel, reducing total wait time.

Here's the definition of 'later, to make this post self contained:

(de later ("@Var" . "@Prg")
   (macro
      (task (pipe (pr (prog . "@Prg")))
         (setq "@Var" (in @ (rd)))
         (task (close @)) ) )
   "@Var" )

thanks for your attention.

Reply via email to