FAQ
Code seems fine but I don't understand the part about the import cycle.



http://codereview.appspot.com/6529053/diff/3007/src/pkg/sync/rwmutex.go
File src/pkg/sync/rwmutex.go (right):

http://codereview.appspot.com/6529053/diff/3007/src/pkg/sync/rwmutex.go#newcode9
src/pkg/sync/rwmutex.go:9: "unsafe"
On 2012/09/19 22:11:59, dvyukov wrote:
Currently this breaks build because of the unexpected dependency between
packages.
What would be the best solution?
I can make this dependency legal. Or import unsafe only into race.go (make
raceAcquire() accept *uint32), then I want to disable dependency check with
-race anyway.
I don't understand what dependency we are talking about. Surely unsafe
does not import sync.

http://codereview.appspot.com/6529053/

Search Discussions

  • Minux at Sep 24, 2012 at 3:37 pm

    On Monday, September 24, 2012, rsc wrote:
    I don't understand what dependency we are talking about. Surely unsafe
    does not import sync.
    I think he talks about go/build/deps_test.go
    We don't allow sync to depend on unsafe.
  • Russ Cox at Sep 24, 2012 at 4:56 pm

    I think he talks about go/build/deps_test.go
    We don't allow sync to depend on unsafe.
    If that's all it is, allowing sync to use unsafe is fine.
  • Dmitry Vyukov at Sep 24, 2012 at 8:53 pm
    Yes, it's go/build/deps_test.
    I will update the patch to allow the dep.

    On Mon, Sep 24, 2012 at 9:49 AM, Russ Cox wrote:

    I think he talks about go/build/deps_test.go
    We don't allow sync to depend on unsafe.
    If that's all it is, allowing sync to use unsafe is fine.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedSep 24, '12 at 3:13p
activeSep 24, '12 at 8:53p
posts4
users3
websitegolang.org

3 users in discussion

Russ Cox: 2 posts Dmitry Vyukov: 1 post Minux: 1 post

People

Translate

site design / logo © 2022 Grokbase