• Russ Cox's avatar
    runtime: randomize scheduling in -race mode · 20280778
    Russ Cox authored
    Basic randomization of goroutine scheduling for -race mode.
    It is probably possible to do much better (there's a paper linked
    in the issue that I haven't read, for example), but this suffices
    to introduce at least some unpredictability into the scheduling order.
    The goal here is to have _something_ for Go 1.5, so that we don't
    start hitting more of these scheduling order-dependent bugs
    if we change the scheduler order again in Go 1.6.
    
    For #11372.
    
    Change-Id: Idf1154123fbd5b7a1ee4d339e93f97635cc2bacb
    Reviewed-on: https://go-review.googlesource.com/11795Reviewed-by: 's avatarAustin Clements <austin@google.com>
    20280778
sched_test.go 972 Bytes