From 59cf78dbab8549761207b706f9856898cb5cd9c2 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Thu, 22 Aug 2024 21:05:40 -0400 Subject: kill: reorder interface declarations --- kill.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'kill.go') diff --git a/kill.go b/kill.go index 2d2022b..81ab8ad 100644 --- a/kill.go +++ b/kill.go @@ -7,12 +7,6 @@ type Killable interface { Dead() <-chan bool } -type attachable interface { - Killable - // Sending to detach() will detach the object from the killer it is attached to. - detach() <-chan bool -} - // A killer can kill the `victim' that is attached to it. // The victim can attach itself to the killer by sending itself via the killer's attach() channel. // The victim can detach itself by sending a signal via its own detach() channel. @@ -23,6 +17,12 @@ type killer interface { attach() chan<- attachable } +type attachable interface { + Killable + // Sending to detach() will detach the object from the killer it is attached to. + detach() <-chan bool +} + // attachHandler implements killer. It allows victims to attach themselves via the attach channel. // There can only be one attached victim at a time. // If attachHandler is killed while a victim is attached, it kills the victim. -- cgit v1.2.3