Re: [go-nuts] Re: CPU scheduler on Xeon

2016-12-13 Thread Stannis Kozlov
Got it! Thanks On Tue, Dec 13, 2016 at 11:35 AM, Dave Cheney wrote: > > > On Tuesday, 13 December 2016 19:20:04 UTC+11, Stannis Kozlov wrote: >> >> Thanks for reply, Dave >> >> I've made simple application and run it on Xeon and i5. In case of i5 I >&g

[go-nuts] Re: CPU scheduler on Xeon

2016-12-13 Thread Stannis Kozlov
Thanks for reply, Dave I've made simple application and run it on Xeon and i5. In case of i5 I see threads as expected, on Xeon CPU only one thread is working. May it related with difference go versions? i5 output (go version 1.6): $ go run test_tr.go Spinning thread Spinning thread Spinning

[go-nuts] CPU scheduler on Xeon

2016-12-12 Thread Stannis Kozlov
I have an app with more that 30 threads which takes 4 of 4 cores on my i5 laptop. Meanwhile when I run the app on 2xE2630 I see only 2 processes and 100% utilization of 2 cores. Is it necessary to apply certain settings to let an application with with multicore architecture? -- You received t

[go-nuts] Re: Network error handle

2016-12-11 Thread Stannis Kozlov
Thanks, folks! It's clear now: func sock() { conn, err := net.Dial("tcp", "192.168.0.1:80") if err != nil { fmt.Printf("\nDial has an error for you: %v\n", err) return } fmt.Fprintf(conn, "GET / HTTP/1.0\r\n\r\n") status, err := bufio.NewReader(conn).ReadString('\n') fmt.Printf

[go-nuts] Re: Network error handle

2016-12-11 Thread Stannis Kozlov
I've modified the function accordingly: func sock() { conn, err := net.Dial("tcp", "192.168.0.1:9991") if err != nil { fmt.Printf("\nDial has an error for you %v", err) } fmt.Fprintf(conn, "GET / HTTP/1.0\r\n\r\n") status, err := bufio.NewReader(conn).ReadString('\n') fmt.Printf("

[go-nuts] Re: thread.join equivalent in Go

2016-12-11 Thread Stannis Kozlov
I've been looking for a solution for .join like method in Go. Finally solution came with "sync": https://golang.org/pkg/sync/#WaitGroup -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from

[go-nuts] Network error handle

2016-12-10 Thread Stannis Kozlov
I'm trying to write simple port scanner and using "net" to check port availability: func sock() { conn, err := net.Dial("tcp", "192.168.0.1:9991") if err != nil { fmt.Printf("\n!!!:: %v", err) conn.Close() Debug return error: !!!:: dial tcp 192.168.0.1:9991: getsockopt: connection re