Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
text/template: document thread safety #6985
None of the template modules specify whether they are thread-safe. Specifically, neither text/template nor html/template contain the word "thread" at all: http://golang.org/pkg/text/template/ http://golang.org/pkg/html/template/ Since net/http spawns separate goroutines for each connection and html/template is so commonly used with it (see various official tutorials), I believe it is highly likely that html/template is, in fact, thread safe. However, the usual assumption is that a module is not thread safe unless specifically indicated otherwise. They should specify if they are thread-safe or not, and which operations are thread safe if not all.