36 lines
423 B
Go
36 lines
423 B
Go
|
// iterator
|
||
|
package m2r
|
||
|
|
||
|
// "fmt"
|
||
|
// "log"
|
||
|
// "strconv"
|
||
|
// "time"
|
||
|
|
||
|
type produced struct {
|
||
|
user string
|
||
|
logins []string
|
||
|
}
|
||
|
|
||
|
func producer() {
|
||
|
|
||
|
for loop {
|
||
|
|
||
|
wg.Wait()
|
||
|
status = _Producer
|
||
|
|
||
|
//start := time.Now()
|
||
|
// estrae un userid dalla lista degli utenti che hanno fatto login
|
||
|
|
||
|
count.AddUser()
|
||
|
wg.Add(1)
|
||
|
count.AddWG()
|
||
|
|
||
|
consume <- produced{
|
||
|
user: "",
|
||
|
logins: []string{"", ""},
|
||
|
}
|
||
|
}
|
||
|
|
||
|
done <- true
|
||
|
}
|