• Austin Clements's avatar
    runtime/race: fix benchmark deadlock · 23ce80ef
    Austin Clements authored
    Currently TestRaceCrawl fails to wg.Done for every wg.Adds if the
    depth ever reaches 0. This causes the test to deadlock. Under the race
    detector, this deadlock is not detected, so the test eventually times
    out.
    
    This only recently became a problem. Prior to commit e870f06c the depth
    would never reach 0 because the strict round-robin goroutine schedule
    ensured that all of the URLs were already "seen" by depth 2. Now that
    the runtime prefers scheduling the most recently started goroutine,
    the test is able to reach depth 0 and trigger this deadlock.
    
    Change-Id: I5176302a89614a344c84d587073b364833af6590
    Reviewed-on: https://go-review.googlesource.com/9344
    Run-TryBot: Austin Clements <austin@google.com>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    23ce80ef
Name
Last commit
Last update
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...