Find a file
Russ Cox 241f63debd runtime: fix finalizer flakiness
The flakiness appears to be just in tests, not in the actual code.
Specifically, the many tests call runtime.GC once and expect that
the finalizers will be running in the background when GC returns.
Now that the sweep phase is concurrent with execution, however,
the finalizers will not be run until sweep finishes, which might
be quite a bit later. To force sweep to finish, implement runtime.GC
by calling the actual collection twice. The second will complete the
sweep from the first.

This was reliably broken after a few runs before the CL and now
passes tens of runs:

while GOMAXPROCS=2 ./runtime.test -test.run=Finalizer -test.short \
        -test.timeout=300s -test.cpu=$(perl -e 'print ("1,2,4," x 100) . "1"')
do true; done

Fixes #7328.

LGTM=dvyukov
R=dvyukov, dave
CC=golang-codereviews
https://golang.org/cl/71080043
2014-03-04 09:46:40 -05:00
api api: add FreeBSD 10 exceptions 2014-03-04 09:26:28 +09:00
doc spec: clarify what is considered a function call for len/cap special case 2014-03-03 20:07:34 -08:00
include all: final merge of NaCl tree 2014-02-27 20:37:00 -05:00
lib codereview: remove unused upload_options.revision 2014-02-24 10:11:37 -05:00
misc misc/makerelease: use windows installer resources from local goroot 2014-03-03 12:50:29 +11:00
src runtime: fix finalizer flakiness 2014-03-04 09:46:40 -05:00
test cmd/gc: use a register to checknil constants. 2014-03-04 08:18:17 +01:00
.hgignore lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
.hgtags tag go1.2.1 2014-03-03 13:22:13 +11:00
AUTHORS A+C: Richard Crowley (individual CLA) 2014-03-01 20:26:38 -08:00
CONTRIBUTORS A+C: Richard Crowley (individual CLA) 2014-03-01 20:26:38 -08:00
favicon.ico
LICENSE
PATENTS
README README: Fix installation instructions 2013-11-20 13:47:37 -08:00
robots.txt

This is the source code repository for the Go programming language.  

For documentation about how to install and use Go,
visit http://golang.org/ or load doc/install-source.html
in your web browser.

After installing Go, you can view a nicely formatted
doc/install-source.html by running godoc --http=:6060
and then visiting http://localhost:6060/doc/install/source.

Unless otherwise noted, the Go source files are distributed
under the BSD-style license found in the LICENSE file.

--

Binary Distribution Notes

If you have just untarred a binary Go distribution, you need to set
the environment variable $GOROOT to the full path of the go
directory (the one containing this README).  You can omit the
variable if you unpack it into /usr/local/go, or if you rebuild
from sources by running all.bash (see doc/install.html).
You should also add the Go binary directory $GOROOT/bin
to your shell's path.

For example, if you extracted the tar file into $HOME/go, you might
put the following in your .profile:

    export GOROOT=$HOME/go
    export PATH=$PATH:$GOROOT/bin

See doc/install.html for more details.