Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Machine > Synchronized im...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 788 of 803
Post > Topic >>

Synchronized implementations

by Joshua Cranmer <Pidgeot18@[EMAIL PROTECTED] > Sep 13, 2007 at 01:27 AM

I have noticed a few times that Java implements synchronized blocks thusly:

aload 4
dup
astore 5
monitorenter
[ various instructions ]
aload 5
monitorexit

Why does it duplicate the variable when running synchronized blocks?
-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth




 3 Posts in Topic:
Synchronized implementations
Joshua Cranmer <Pidgeo  2007-09-13 01:27:03 
Re: Synchronized implementations
Roedy Green <see_websi  2007-09-13 07:16:13 
Re: Synchronized implementations
Barb Knox <see@[EMAIL   2007-09-13 20:33:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 0:08:15 CDT 2008.