Commit 30c04b55 authored by Pasan Mallawaarachchi's avatar Pasan Mallawaarachchi 💻

3000 iterations and exit

parent f3d11b4d
...@@ -102,6 +102,7 @@ type MailBody struct { ...@@ -102,6 +102,7 @@ type MailBody struct {
* Global VAriables * Global VAriables
*/ */
var childs = 0 // No of subchilds / workers var childs = 0 // No of subchilds / workers
var count = 0
var waitGroup sync.WaitGroup var waitGroup sync.WaitGroup
var mailData chan string var mailData chan string
var outboxReadTime chan string var outboxReadTime chan string
...@@ -143,6 +144,11 @@ func main() { ...@@ -143,6 +144,11 @@ func main() {
for 1 == 1 { for 1 == 1 {
if childs < 4 { if childs < 4 {
count++
if count == 3000 {
fmt.Println("3000 completed")
os.Exit(3)
}
childs++ childs++
//time.Sleep(time.Second * 1) //time.Sleep(time.Second * 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment