Single D app entered multiple times from command line
Vladimir Panteleev
thecybershadow.lists at gmail.com
Mon Sep 23 21:44:56 UTC 2019
On Monday, 23 September 2019 at 19:14:15 UTC, Brett wrote:
> I imagine I could potentially create a separate process that
> has a communication layer between it and the D program but I'm
> hoping it would be less work.
You're pretty much describing a client-server design. A lot of
software does work in this way, e.g.:
- MS toolchain spawns mspdbsrv to write PDB files
- Gradle (Java build tool) spawns a daemon which caches
information in memory
- Git on Windows also creates long-lived processes to cache
filesystem information
The simplest design would be for the server to listen on a named
pipe (perhaps named after the current directory), and the client
to do nothing but forward the command-line arguments and input to
the daemon through the pipe, then read back the result and
present it to the user.
More information about the Digitalmars-d-learn
mailing list