[go-nuts] Easy to use (getopt based) flags package

2019-04-09 Thread Paul Borman
I have never been quite happy with the flags packages available for Go, including the standard flags package as well as my own getopt packages (v1 and v2). They are just too cumbersome to use. I finally have come up with a solution that I like. github.com/pborman/options

Re: [go-nuts] Modifying the Runtime Scheduler

2019-04-09 Thread Tharen Abela
I managed to resolve the issue by allocating in non-GC memory, using persistentalloc. Should anyone want to look into it in detail, here is the commit On Monday, 8 April 2019 20:50:48 UTC+2, Tharen Abela

Re: [go-nuts] Why will it deadlock if a goroutine acquire a mutex while pinned to its P?

2019-04-09 Thread 'Austin Clements' via golang-nuts
Acquiring a mutex while pinned can cause deadlock because pinning prevents a stop-the-world. For example, the following sequence could result in a deadlock: M1: Acquires mutex l. M2: Pins the M. M2: Attempts to acquire mutex l. M3: Initiates stop-the-world M3: Stops M1 M3: Attempts to stop M2,

[go-nuts] Access to variable names on goroutine stacks and on the heap in the runtime

2019-04-09 Thread vaastav . anand05
I have been working on a research project where I have been modifying the runtime such that I can control the goroutines that are scheduled as well as get access to the values of program variables. I know I can access the stack through the g struct for a goroutine but I was wondering if someone

Re: [go-nuts] Proposal: test in one package can import functions from another package's test

2019-04-09 Thread Ben Burwell
On Mon, Apr 08, 2019 at 08:33:44PM -0700, nanmu42 wrote: > I don't know you, but to me, writing Golang test is a little dreary. > > As a discussion, I think this proposal could bring some improvement. > > How do you like it? > > https://github.com/golang/go/issues/31135 In your (admittedly

Re: [go-nuts] Proposal: test in one package can import functions from another package's test

2019-04-09 Thread Nanmu Lee
No, you are right, I really don't. Thanks for your idea. I should consider decoupling those parts, in a somehow nice way. Ben Burwell 於 2019年4月9日 週二 下午8:10 寫道: > On Mon, Apr 08, 2019 at 08:33:44PM -0700, nanmu42 wrote: > > I don't know you, but to me, writing Golang test is a little dreary. >