counter usa i 'chanel'

This commit is contained in:
Michele 2016-12-20 15:37:32 +01:00
parent a3a02eac55
commit 36f6aa8a83
6 changed files with 127 additions and 43 deletions

View file

@ -60,9 +60,15 @@ func producer() {
// log.Printf("PROD (%d): user=%s login=%d in %v - conn=%d\n", id, user, len(logs), time.Since(start), dbs.rdb.ActiveCount())
}
count.AddUser()
counter <- Counterchan{
tipo: "user",
val: 1,
}
wg.Add(1)
count.AddWG()
counter <- Counterchan{
tipo: "wg",
val: 1,
}
consume <- produced{
user: user,