]> Cypherpunks repositories - gostls13.git/commit
runtime: correct memory leak in select
authorRuss Cox <rsc@golang.org>
Thu, 1 Apr 2010 18:56:18 +0000 (11:56 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 1 Apr 2010 18:56:18 +0000 (11:56 -0700)
commitec53627ed52e099685d4b60c19630ddcf22904d6
treee7209f274506247695fbfb5a9d6370947c6fafaa
parent31693e9f148e4bea3f923bed84dcec4f3c8be918
runtime: correct memory leak in select
  * adds pass 3 to dequeue from channels eagerly

various other cleanup/churn:
  * use switch on cas->send in each pass to
    factor out common code.
  * longer goto labels, commented at target
  * be more agressive about can't happen:
    throw instead of print + cope.
  * use "select" instead of "selectgo" in errors
  * use printf for debug prints when possible

R=ken2, ken3
CC=golang-dev, r
https://golang.org/cl/875041
src/pkg/runtime/chan.c
test/chan/select2.go [new file with mode: 0644]