• Alan Donovan's avatar
    go/token: use fine-grained locking in FileSet · 17ba830f
    Alan Donovan authored
    Before, all accesses to the lines and infos tables of each File were
    serialized by the lock of the owning FileSet, causing parsers running
    in parallel to contend.  Now, each File has its own mutex.
    
    This fixes a data race in (*File).PositionFor, which used to call
    f.position then f.unpack without holding the mutex's lock.
    
    Fixes golang/go#18348
    
    Change-Id: Iaa5989b2eba88a7fb2e91c1a0a8bc1e7f6497f2b
    Reviewed-on: https://go-review.googlesource.com/34591Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    17ba830f
Name
Last commit
Last update
..
ast Loading commit data...
build Loading commit data...
constant Loading commit data...
doc Loading commit data...
format Loading commit data...
importer Loading commit data...
internal Loading commit data...
parser Loading commit data...
printer Loading commit data...
scanner Loading commit data...
token Loading commit data...
types Loading commit data...