onDaemonThread

private fun onDaemonThread(name: String, body: () -> Unit)

Run body on a daemon thread and wait. HttpServer's dispatcher copies the daemon flag of whichever thread calls start(), and mod init is not one — a dispatcher started from there would keep the JVM alive after /stop. stop(0) joins it, so a released server leaves nothing behind.