• Austin Clements's avatar
    runtime: record mutex event before readying · b067ad93
    Austin Clements authored
    Currently, semrelease1 readies the next waiter before recording a
    mutex event. However, if the next waiter is expecting to look at the
    mutex profile, as is the case in TestMutexProfile, this may delay
    recording the event too much.
    
    Swap the order of these operations so semrelease1 records the mutex
    event before readying the next waiter. This also means readying the
    next waiter is the very last thing semrelease1 does, which seems
    appropriate.
    
    Fixes #19139.
    
    Change-Id: I1a62063599fdb5d49bd86061a180c0a2d659474b
    Reviewed-on: https://go-review.googlesource.com/45751
    Run-TryBot: Austin Clements <austin@google.com>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: 's avatarPeter Weinberger <pjw@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    b067ad93
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...