Re: NumberFormat and thread safety
Re: NumberFormat and thread safety
- Subject: Re: NumberFormat and thread safety
- From: Paul Lynch <email@hidden>
- Date: Mon, 24 Jul 2006 20:55:42 +0100
On 24 Jul 2006, at 20:25, Chuck Hill wrote:
I create one formatter object per format in each application (e.g.
long date format, short date format).
On Jul 24, 2006, at 12:05 PM, Kieran Kelleher wrote:
Commonly used NumberFormatters seem like obvious candidates for
using lazily created and cached shared instances, however the
superclass java.text.Format is not thread safe and
NSNumberFormatter does not specify in the API. Could someone share
what strategy they typically use for WO development .... a number
formatter instance for each session, for each R-R worker thread, etc.
I do the same as Chuck, never had any problems. The worker threads
shouldn't be interfering with anything inside my components, as I
understand it, so this should only be an issue if you write multi-
threaded WO code, which I wouldn't recommend.
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden