summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2015-10-23 19:34:43 +0200
committerSilvan Jegen <s.jegen@gmail.com>2015-10-27 21:40:57 +0100
commit03f3bf552bc3101bcb443f65ddf0b4f434a233e5 (patch)
tree663b2a9e9d62293561d752865c6fe95170ddc67f
parent8c7d508a91a7aa27b2a4b07e22b5bb624f0e0e44 (diff)
Remove debugging statements
-rw-r--r--gwic.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/gwic.go b/gwic.go
index 2a28f43..a01ac45 100644
--- a/gwic.go
+++ b/gwic.go
@@ -52,12 +52,10 @@ func feedworkers(wlist []*work, w string) []*work {
ret = make([]*work, len(wlist))
copy(ret, wlist)
- //fmt.Fprintf(os.Stderr, "wlist not empty: %v ret: %v\n", wlist, ret)
for _, wc := range wlist {
if wc.left == 0 {
wc.finish()
- //fmt.Fprintf(os.Stderr, "Closed wc: %s\n", wc)
// TODO: remove the right one?
if len(wlist) >= 1 {
ret = wlist[1:]
@@ -65,7 +63,6 @@ func feedworkers(wlist []*work, w string) []*work {
} else {
wc.c <- w
wc.left -= 1
- //fmt.Fprintf(os.Stderr, "diminished wc: %v\n", wc)
}
}
@@ -85,19 +82,15 @@ func printqueue(q *queue, words chan string, left int, out chan string) {
q.insert(fmt.Sprintf("%q", w))
- //fmt.Fprintf(os.Stdout, "%q totally matched %q\n", w, kw)
- //fmt.Fprintf(os.Stdout, "queue was %v\n", q.q)
-
wc := &work{c: make(chan string, 10), left: 5, done: make(chan struct{})}
hungryhippos = feedworkers(hungryhippos, w)
sl := make([]string, MAX)
- //n := copy(sl, q.q[6:])
copy(sl, q.q[6:])
- //fmt.Fprintf(os.Stdout, "copied %d : %v\n", n, sl)
+
hungryhippos = append(hungryhippos, wc)
- //fmt.Fprintf(os.Stderr, "appended hungryhippos: %v %d\n", hungryhippos, len(hungryhippos))
+
go wc.print_kwic(sl, out)
}
for _, wc := range hungryhippos {