Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5907)

Issue 7202045: code review 7202045: net: use LockOSThread instead of global mutexes (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by snaury
Modified:
11 years, 2 months ago
Reviewers:
rsc, brainman, dave, golang-dev
Visibility:
Public.

Description

net: use LockOSThread instead of global mutexes Global mutexes not only harm concurrency by allowing only one lookup at a time, but are also misleading: user code may make identical syscalls from other goroutines without protection of the same mutex. When lookup code uses its results it might be executing on another thread and concurrent calls will overwrite that data. This change depends on CL 7197050 to work correctly.

Patch Set 1 #

Patch Set 2 : diff -r d8bddc63dacc https://code.google.com/p/go/ #

Patch Set 3 : diff -r d8bddc63dacc https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -13 lines) Patch
M src/pkg/net/lookup_windows.go View 1 3 chunks +7 lines, -13 lines 0 comments Download

Messages

Total messages: 19
snaury
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 3 months ago (2013-01-23 19:58:23 UTC) #1
brainman
I guess you should change it as per rsc suggestion on your other CL. Thank ...
11 years, 3 months ago (2013-01-23 22:42:59 UTC) #2
dave_cheney.net
Why can't we use the newLookup method ? That appears to solve all the problems ...
11 years, 3 months ago (2013-01-23 22:56:59 UTC) #3
brainman
newLookup method uses windows API that is only available on "newer" versions of OS. Alex
11 years, 3 months ago (2013-01-23 23:19:07 UTC) #4
dave_cheney.net
i thought i heard someone say xp sp2 and above? On Thursday, January 24, 2013, ...
11 years, 3 months ago (2013-01-23 23:21:13 UTC) #5
brainman
On 2013/01/23 23:21:13, dfc wrote: > i thought i heard someone say xp sp2 and ...
11 years, 3 months ago (2013-01-24 00:10:18 UTC) #6
rsc
Alex's suggestion SGTM.
11 years, 3 months ago (2013-01-24 02:50:42 UTC) #7
snaury
*** Abandoned ***
11 years, 2 months ago (2013-01-30 17:15:57 UTC) #8
rsc
FWIW, I don't believe anyone is implementing Alex's suggestion (I thought you would in this ...
11 years, 2 months ago (2013-01-30 17:28:47 UTC) #9
snaury
On 2013/01/30 17:28:47, rsc wrote: > FWIW, I don't believe anyone is implementing Alex's suggestion ...
11 years, 2 months ago (2013-01-30 17:58:08 UTC) #10
rsc
Alex's suggestion is to figure out whether we are on a new enough system to ...
11 years, 2 months ago (2013-01-30 17:59:18 UTC) #11
snaury
On 2013/01/30 17:59:18, rsc wrote: > Alex's suggestion is to figure out whether we are ...
11 years, 2 months ago (2013-01-30 18:07:10 UTC) #12
snaury
On 2013/01/30 17:59:18, rsc wrote: > Alex's suggestion is to figure out whether we are ...
11 years, 2 months ago (2013-01-30 18:18:55 UTC) #13
rsc
Thanks, I didn't realize we already used newLookup where appropriate. I understand how the old ...
11 years, 2 months ago (2013-01-30 19:01:45 UTC) #14
snaury
On 2013/01/30 19:01:45, rsc wrote: > I assume this is not actually causing problems for ...
11 years, 2 months ago (2013-01-30 19:38:05 UTC) #15
brainman
On 2013/01/30 19:01:45, rsc wrote: > Thanks, I didn't realize we already used newLookup where ...
11 years, 2 months ago (2013-01-31 00:24:25 UTC) #16
rsc
SGTM
11 years, 2 months ago (2013-01-31 01:22:21 UTC) #17
brainman
On 2013/01/31 00:24:25, brainman wrote: > On 2013/01/30 19:01:45, rsc wrote: > > Thanks, I ...
11 years, 2 months ago (2013-02-01 06:20:09 UTC) #18
brainman
11 years, 2 months ago (2013-02-04 01:50:29 UTC) #19
Message was sent while issue was closed.
On 2013/01/31 01:22:21, rsc wrote:
> SGTM

https://codereview.appspot.com/7293043/

Alex
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b