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

Issue 5450056: code review 5450056: html/template: make execution thread-safe (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by r
Modified:
12 years, 5 months ago
Reviewers:
CC:
golang-dev, adg
Visibility:
Public.

Description

html/template: make execution thread-safe The problem is that execution can modify the template, so it needs interlocking to have the same thread-safe guarantee as text/template. Fixes issue 2439.

Patch Set 1 #

Total comments: 2

Patch Set 2 : diff -r f73733f21799 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 69cec8583a92 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -30 lines) Patch
M src/pkg/html/template/escape.go View 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/html/template/template.go View 1 8 chunks +56 lines, -28 lines 0 comments Download

Messages

Total messages: 5
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 5 months ago (2011-11-30 23:27:55 UTC) #1
adg
http://codereview.appspot.com/5450056/diff/1/src/pkg/html/template/template.go File src/pkg/html/template/template.go (right): http://codereview.appspot.com/5450056/diff/1/src/pkg/html/template/template.go#newcode41 src/pkg/html/template/template.go:41: defer t.nameSpace.mu.Unlock() Wouldn't it be better to release this ...
12 years, 5 months ago (2011-11-30 23:38:33 UTC) #2
r
Hello golang-dev@googlegroups.com, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 5 months ago (2011-12-01 03:31:51 UTC) #3
adg
LGTM
12 years, 5 months ago (2011-12-01 04:07:22 UTC) #4
r
12 years, 5 months ago (2011-12-01 04:11:52 UTC) #5
*** Submitted as http://code.google.com/p/go/source/detail?r=e22dbef7457e ***

html/template: make execution thread-safe
The problem is that execution can modify the template, so it needs
interlocking to have the same thread-safe guarantee as text/template.
Fixes issue 2439.

R=golang-dev, adg
CC=golang-dev
http://codereview.appspot.com/5450056
Sign in to reply to this message.

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