func (c *control) Close() {
	if c.C != nil && c.D != nil {
		c.C <- true
		<-c.D
	}
}
Close function closes the channel and waits for the done channel.
package observer
type control struct {
	C chan bool
	D chan bool
}