• Austin Clements's avatar
    runtime: define lock order between G status and channel lock · d45bf722
    Austin Clements authored
    Currently, locking a G's stack by setting its status to _Gcopystack or
    _Gscan is unordered with respect to channel locks. However, when we
    make stack shrinking concurrent, stack shrinking will need to lock the
    G and then acquire channel locks, which imposes an order on these.
    
    Document this lock ordering and fix closechan to respect it.
    Everything else already happens to respect it.
    
    For #12967.
    
    Change-Id: I4dd02675efffb3e7daa5285cf75bf24f987d90d4
    Reviewed-on: https://go-review.googlesource.com/20041Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    d45bf722
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...