Use of synchronized methods in components

Rod Widdowson rdw at steadingsoftware.com
Tue May 6 10:52:01 EDT 2014


> If you have explicit locking, that's not threadsafe, it's explicitly not
> safe.

If I can rewrite that as 

"If I have to use explicit locking when I call any method in that class in
order to get the desired semantics in an asynchronous world, then its
explicitly not thread safe"

I'll buy that (I think). I don't think I would find it useful except perhaps
I'd want to ask some piercing questions if we wanted to expose non thread
safe classes - that’s an invitation to people to screw up.  That’s why we
invented the service abstraction.

Thanks
 



More information about the dev mailing list