Re: [go-nuts] ctrl-c and Golang

2019-02-16 Thread Hemant Singh
Thanks, David. Let me look into passing as a parameter. Actually, I didn't paste all the code. My array in the for loop does have a check that if array limit is reached, I set the index to zero and overwrite data. Thus, the last 65536 entries are looked at. Hemant On Saturday, February

Re: [go-nuts] ctrl-c and Golang

2019-02-16 Thread David Riley
I suspect it's because your reference to the time_array is actually copying it into your closure that's running as the goroutine instead of making a reference to it. You might do better to pass that array as a parameter to the goroutine instead of trying to absorb it as context. I should note

[go-nuts] ctrl-c and Golang

2019-02-16 Thread Hemant Singh
I have the following program. The program is processing network packets at 1 Gbps rate. I don't want to print the rate for every packet. Instead, I'd like to save the rate in an array and dump the array on Ctrl-c of the program. When I dump the array on Ctrl-c, the data is all zeroes.