summaryrefslogtreecommitdiff
path: root/src/regexp/syntax/prog.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2015-03-13 13:37:57 +0300
committerDmitry Vyukov <dvyukov@google.com>2015-03-18 08:57:30 +0000
commitfcb895feef1c9214f9cb633b5a0fa4dc8f46af9e (patch)
tree954038131b8667899c76898a130ed8489c556381 /src/regexp/syntax/prog.go
parentecd630de6dd2e5285f18c650207b5c84649402db (diff)
downloadgo-git-fcb895feef1c9214f9cb633b5a0fa4dc8f46af9e.tar.gz
runtime: add a select test
One of my earlier versions of finer-grained select locking failed on this test. If you just naively lock and check channels one-by-one, it is possible that you skip over ready channels. Consider that initially c1 is ready and c2 is not. Select checks c2. Then another goroutine makes c1 not ready and c2 ready (in that order). Then select checks c1, concludes that no channels are ready and executes the default case. But there was no point in time when no channel is ready and so default case must not be executed. Change-Id: I3594bf1f36cfb120be65e2474794f0562aebcbbd Reviewed-on: https://go-review.googlesource.com/7550 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/regexp/syntax/prog.go')
0 files changed, 0 insertions, 0 deletions