Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

static synchronized and non-static synchronized  RSS feed

 
Kee Kee moon
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we call static or non-static synchronized methods in the same class, it will block each other if they are invoked using the same instance.
Does it mane we should not either call static or non-static methods in the same class it they are invoked using the same instance, otherwise they will
be dead-locked.

Thanks
 
Kee Kee moon
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kee Kee moon wrote:If we call static or non-static synchronized methods in the same class, it will block each other if they are invoked using the same instance.
Does it mane we should not either call static or non-static methods in the same class it they are invoked using the same instance, otherwise they will
be dead-locked.

Thanks


I withdraw this question.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!