Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(352)

Unified Diff: src/pkg/io/ioutil/blackhole_race.go

Issue 6624059: code review 6624059: io/ioutil: fix data race under the race detector (Closed)
Patch Set: diff -r a1bbd399fc9b https://dvyukov%40google.com@code.google.com/p/go/ Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/io/ioutil/blackhole.go ('k') | src/pkg/io/ioutil/ioutil.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/io/ioutil/blackhole_race.go
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/pkg/io/ioutil/blackhole_race.go
@@ -0,0 +1,13 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build race
+
+package ioutil
+
+// Replaces the normal fast implementation with slower but formally correct one.
+
+func blackHole() []byte {
+ return make([]byte, 8192)
+}
« no previous file with comments | « src/pkg/io/ioutil/blackhole.go ('k') | src/pkg/io/ioutil/ioutil.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b