• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Synchronized blocks

 
Fitz Herbert
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can they be nested?
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you could try nesting them and see what the compiler tells you!
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can they be nested?
Yes, but what's the point unless you are synchronizing different objects? Even so, it's risky, a deadlock waiting to happen.
 
Fitz Herbert
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thankyou
 
Nicholas Turner
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah really quite funny. Like especially if Objecta synchronizes a recursive function.
Ha ha it will deadlock itself. I think. It would be even funnier if I didnt know what I was talking about
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic