The runtime.Gosched in the spin lock is going to be quite expensive. I found it's best to only do that every once and awhile, maybe every 100 iterations of the loop or so (you'll want to find optimal for your case).
On Tuesday, October 4, 2016 at 4:09:30 AM UTC-5, sphil...@gmail.com wrote: > > Try spinlocks instead of mutexes: > https://github.com/pi/goal/blob/master/gut/spinlock.go > -- 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 it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.