[go-nuts] Re: confusing a lock demo about https://golang.org/ref/mem#tmp_8

2018-03-15 Thread 郎凯
Thank you very much. 在 2018年3月15日星期四 UTC+8上午7:27:40,Subbu M写道: > > Hi, > > First Lock - starts the Lock and executes the following statements until > next Mutex functions are called. > Here Sync.Mutex I is gloabal, called Unlock in function f(). > As said second lock starts after function f() is

[go-nuts] Re: confusing a lock demo about https://golang.org/ref/mem#tmp_8

2018-03-14 Thread Subbu M
Hi, First Lock - starts the Lock and executes the following statements until next Mutex functions are called. Here Sync.Mutex I is gloabal, called Unlock in function f(). As said second lock starts after function f() is executed. regards Subbu On Tuesday, March 13, 2018 at 6:27:08 AM UTC-7, 郎凯 w

[go-nuts] Re: confusing a lock demo about https://golang.org/ref/mem#tmp_8

2018-03-13 Thread 郎凯
Thank you for your advice, this is my first time to ask a question there. 在 2018年3月13日星期二 UTC+8下午11:00:46,Jake Montgomery写道: > > I would like to point out that the example code you refer to is meant to > illustrate a specific behavior of locks. It is *not* necessarily intended > to be an example

[go-nuts] Re: confusing a lock demo about https://golang.org/ref/mem#tmp_8

2018-03-13 Thread jake6502
I would like to point out that the example code you refer to is meant to illustrate a specific behavior of locks. It is *not* necessarily intended to be an example of good style. As a "new gopher" I would avoid this idiom. If you did use this, some significant commenting would be needed. Also,