A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Jul 15, 2009
Jul 24, 2009 03:06:17
How can we make a method thread-safe (but in terminology we are talking about classes as thread safe) by declaring it as static, i know about synchronized concept but is it possible to make thread safe with only static key word.
Joined: Mar 22, 2005
Jul 24, 2009 03:22:17
Declaring a method as static has no impact on its thread-safety (or thread-unsafety); that's determined by what the method does with data structures that represent shared state.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Thread safe
Thread Safety in Servlets
Mock Question about thread-safe
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014