• Ian Lance Taylor's avatar
    netchan: Fix race condition in test. · b279c048
    Ian Lance Taylor authored
    Two tests start a goroutine which runs exportSend, and then
    the tests run importReceive.  exportSend creates an export
    channel.  importReceive asks to receive values on that
    channel.  Because exportSend runs in a separate goroutine,
    it's possible for the export client to receive the request for
    values on the channel, from importReceive, before the
    goroutine actually creates the export channel.  That causes an
    error: "export: no such channel: exportedSend".  This patch
    avoids the race by creating the export channel before starting
    the goroutine.
    
    There does not seem to be a similar race condition in the
    tests which send data in the other direction.
    
    R=r
    CC=golang-dev
    https://golang.org/cl/2026045
    b279c048
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libcgo Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.ccmd Loading commit data...
Make.clib Loading commit data...
Make.cmd Loading commit data...
Make.common Loading commit data...
Make.inc Loading commit data...
Make.pkg Loading commit data...
all-arm.bash Loading commit data...
all-nacl.bash Loading commit data...
all.bash Loading commit data...
clean.bash Loading commit data...
env.bash Loading commit data...
make.bash Loading commit data...
quietgcc.bash Loading commit data...
run.bash Loading commit data...
sudo.bash Loading commit data...
version.bash Loading commit data...