Re: [go-nuts] net library

2019-08-19 Thread fgergo
On Tue, Aug 20, 2019, 03:43 joe mcguckin wrote: > I was perusing the NET library web page today. > > 1) Are the packages listed in any particular order? > > 2) What is the hierarchy? e.g., which functions correspond to the low > level Unix network calls, > then there must be some higher leve

[go-nuts] net library

2019-08-19 Thread joe mcguckin
I was perusing the NET library web page today. 1) Are the packages listed in any particular order? 2) What is the hierarchy? e.g., which functions correspond to the low level Unix network calls, then there must be some higher level convenience functions. Is there a list of how the functio

Re: [go-nuts] Thread ID in glog

2019-08-19 Thread Ian Lance Taylor
On Mon, Aug 19, 2019 at 2:05 PM Ramya Raj wrote: > > In this line, are you planning to change pid to thread ID? I would like to > use glogs to display different IDs for each worker thread. I'm not sure about that comment. The thread ID would likely be unhelpful, as goroutines migrate between th

[go-nuts] Thread ID in glog

2019-08-19 Thread Ramya Raj
Hey! In this line , are you planning to change pid to thread ID? I would like to use glogs to display different IDs for each worker thread. Thanks, Ramya -- You received this message because you are subsc

Re: [go-nuts] Re: golang with XSLT

2019-08-19 Thread Sam Whited
On Mon, Aug 19, 2019, at 20:31, 'Eric Johnson' via golang-nuts wrote: > Tips: > * When ever you're wondering about a good library for , two good > places to start are https://go-search.org , and > https://github.com/avelino/awesome-go. Also try searching on https://godoc.org/ —Sam -- You

[go-nuts] Re: golang with XSLT

2019-08-19 Thread 'Eric Johnson' via golang-nuts
Tips: - When ever you're wondering about a good library for , two good places to start are https://go-search.org , and https://github.com/avelino/awesome-go. - As an alternative to finding a Go implementation, reuse an existing one (libxslt) by calling out to C code. It may s

Re: [go-nuts] sync.Mutex encounter large performance drop when goroutine contention more than 3400

2019-08-19 Thread Robert Engels
I think you'll find the reason that the Mutex uses the Go scheduler. The chan is controlled by a 'mutex' which eventually defers to the OS futex - and the OS futex is probably more efficient at scheduling in the face of large contention - although you would think it should be the other way around.I

Re: [go-nuts] sync.Mutex encounter large performance drop when goroutine contention more than 3400

2019-08-19 Thread changkun
Hi Ian, Thanks for the hint. I tried on a Mac mini with i5-8500B, it seems the unexpected performance drop still exists (let GOMAXPROCS(8)) the control condition is the CPU: [image: sync.Mutex performance (GOMAXPROCS == 8).png] On Monday, August 19, 2019 at 9:15:50 PM UTC+2, Ian Lance Taylor

Re: [go-nuts] Re: mutual exclusion algorithm of Dijkstra - strange behaviour

2019-08-19 Thread 'David Chase' via golang-nuts
If you want preemption within a particular package, you can compile it "go build -gcflags=particular_package=-d=ssa/insert_resched_checks/on" . That will not fix any problems with underlying raciness, though it may mask them. If you want an entire compiler that defaults to that mode and librarie

Re: [go-nuts] sync.Mutex encounter large performance drop when goroutine contention more than 3400

2019-08-19 Thread Ian Lance Taylor
On Mon, Aug 19, 2019 at 10:50 AM changkun wrote: > > I am comparing the performance regarding sync.Mutex and Go channels. Here is > my benchmark: https://play.golang.org/p/zLjVtsSx9gd Might be interesting to try running your benchmark on a machine with different hardware. Ian -- You received

[go-nuts] sync.Mutex encounter large performance drop when goroutine contention more than 3400

2019-08-19 Thread changkun
I am comparing the performance regarding sync.Mutex and Go channels. Here is my benchmark: https://play.golang.org/p/zLjVtsSx9gd The performance comparison visualization is as follows: [image: sync.Mutex performance (1).png] What are the reasons that 1. sync.Mutex encounter a large performance

[go-nuts] Existing production-ready libraries for parallelizing HTTP requests?

2019-08-19 Thread tom via golang-nuts
tl;dr Do you of any libraries for parallelizing HTTP requests with per-server concurrency control and handling of retries? I'm writing a service that fetches many independent small binary blobs (map tiles) over HTTP from a several upstream servers and package them together in to a single archiv

[go-nuts] Re: Golang project ideas

2019-08-19 Thread B Carr
Lots of consumer devices do not have webGUIs for them (CLI access only). Example, pick a consumer network router/switch such as one that OpenWRT can use. Many have a webGUI for the switch side of the unit but not the router side. Write a webGUI for the router side with an eye toward eventually

Re: [go-nuts] Golang project ideas

2019-08-19 Thread Michel Levieux
Hi, Don't know if you're looking for something that has never been done or if you don't really care and just want practice, but those are three ideas I can think of. :) - A web tracker that can be plugged into any website easily - A lightweight real-time bidder - Making an interpreter for a (simp