First version, 0.1.0

This commit is contained in:
jar3b
2019-04-09 17:32:35 +03:00
parent 3b30616476
commit f8e923b600
4 changed files with 114 additions and 0 deletions

17
close_handler.go Normal file
View File

@@ -0,0 +1,17 @@
package grawt
type CloseHandler struct {
waiter *Waiter
Quit chan bool
active bool
autoDone bool
handlerFunc *func()
}
func (ch *CloseHandler) Halt(err error) {
ch.waiter.Halt(err)
}
func (ch *CloseHandler) Done() {
ch.waiter.terminateHandler(ch, true)
}