Paul O'Leary wrote:
>
> A quick (I'll try, anyway) reply to both Jon S and John McN's posts on
> thread syncing, particulary with respect to the Loaders. Boy, my 1 line BTW
> kinda went off like a grenade ;)
...
>
> Guys, my intent was never to assert that there were general problems with
> the Loaders, only that I had noticed a few minor-looking issues that
> suggested further review. Just like the connection pool. My experience is
> that threading issues can bite you in many, many ways. In code that has to
> be thread-safe it's always better to be a little paranoid rather than try to
> figure out *if* there could be a problem.
>
I have no problem with someone pointing out a flaw in code I have
written or read through and concluded it was not a problem. Especially
when the comments make sense :)
I looked at this code and decided to not synchronize based on my
conclusion that I did not want to limit multiple threads from getting
the value when it does not matter if the object gets cached twice+. The
object is cached once and used until the app is shut down.
This analysis assumed (wrongly, from the recent discussion) a Hashtable
was thread-safe.
I still hate to add the inefficiency if it is not necessary, but maybe
it should be added until it is absolutely determined to be safe.
John McNally
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]