• Post Reply Bookmark Topic Watch Topic
  • New Topic

To declare Syncronized or Not, always the question!  RSS feed

 
Paul Duer
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

Here's a quick question about Syncronized methods.

Here's the method:


I call this code from a servlet, I call the method statically and I am sure that I am always passing different resources. Does this need to be syncronized?

[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ May 27, 2004: Message edited by: Dirk Schreckmann ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a static method that doesn't use the state of any object. What's to synchronize?

I'm moving this to the Threads and Synchronization forum...
[ May 27, 2004: Message edited by: Dirk Schreckmann ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!