synchronized void function()
{
int two = 1+1;
}
is really just short for
void function()
{
synchronized(this)
{
int two = 1+1:
}
}
same thing with synchronized static functions, except they synchronize on Foo.class
synchronized void function()
{
int two = 1+1;
}
void function()
{
synchronized(this)
{
int two = 1+1:
}
}
No comments:
Post a Comment