closes #19: kill underlings with system level interrupts

This commit is contained in:
2025-06-06 12:20:49 -05:00
parent 6687008d1a
commit e0595de71a
6 changed files with 57 additions and 22 deletions

15
tests/kill.ce Normal file
View File

@@ -0,0 +1,15 @@
// This tests forceful killing of an underling that may even be in the middle of a turn
$_.start(e => {
log.console(`got message from hanger: ${e.type}`)
if (e.type == 'greet')
$_.delay(_ => {
log.console(`sending stop message to hanger`)
$_.stop(e.actor)
}, 1)
if (e.type == 'disrupt') {
log.console(`underling successfully killed.`)
$_.stop()
}
}, 'hang')