LispBM process monitoring using spawn-trap

Опубликовано: 20 Январь 2025
на канале: Joel Svensson
48
1

New feature in LispBM, spawn-trap, spawns a child process and allows the parent to "trap" the exit status of that child. Another somewhat Erlang inspired feature.

When a "spawn-trap"ed child exits it sends a message to the parent with either a success status or error.

In the example code here, a process monitor is implemented that restarts a child after crashing.