|
From: | Rudi C |
Subject: | Re: Is there any easy way to fork in elisp? Why not? |
Date: | Fri, 29 Oct 2021 01:46:59 +0330 |
> If the server could just fork, eval the request, return it, and die,
> everything would be easy and painless.
>
> The fork API could be:
> ```
> (let-fork ((some_val (expensive_compute)) ...)
> (lambda()
> (message "Computed: %s" some_val)))
> ```
We should indeed add such support in core. Currently the `async`
package offers such functionality, but I think this belongs in core.
More generally a kind of "Emacs batch server" will be useful.
Something similar to the server.el but whose purpose would be to launch
independent/fresh batch Emacs sessions efficiently.
A long time ago I suggested to add support for the `fork`
POSIX primitive which could be ideal for that, but AFAIK it's hard to
provide such a functionality in w32, so we'd want the Lisp-level API not
to be tied to the semantics of POSIX `fork`.
Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |