[stringtemplate-interest] thread safety
Nikolas Everett
nik9000 at gmail.com
Fri Nov 13 07:25:01 PST 2009
>
> BTW: the DateRenderer you announced recently implicitly relies on
> the fact that DateFormat.get...Instance(style) does _not_ return the same
> object for the same style. If it would (which we cannot control and
> which could change with any jdk update), calling f.format(d) would
> not be thread safe as DateFormat ist not thread safe.
> synchronized(f) {return f.format(d);}
> would therefore be safer.
>
>
> While your point is valid that update would break a lot more than just ST.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20091113/bc40fd5c/attachment.html
More information about the stringtemplate-interest
mailing list