func notifyRemoval() { log.Debugln("Checking removal notification...") if chn.NeedsRemovalNotification() { log.Debugln("Needs removal notification. Sending message...") chn.GetRemovalChannel() <- struct{}{} log.Debugln("Removal notified") chn.SetRemovalNotification(false) } }
func waitForRemoval() { log.Debugln("Waiting for removal confirmation...") <-ch.GetRemovalChannel() log.Debugln("Remove complete") }