19.02.2020
Locked

I have a title block inserted into a drawing containing a number of attributes which link back to the drawing properties dialogue box. Some of the attribute tag positions are locked and some are not. I wish to reposition one of the attributes within the block to another location on the drawing sheet, but it is one that the position is locked. Is there a way of unlocking the lock position tags so I can reposition that tag?

RE: unlock locked attribute positions within a block? (Civil/Environmental) 3 Nov 06 02:56. Seems that if you go direct to 'battman' there isn't a function to adjust lock or unlock, which is rather odd. The only way I found which works is open the block in block editor, select the attribute and change its coordinates within the block (via properties or maybe just drag it) (I suppose you could do this with 'edit in place' as well but I didnt try it). The position is therefore changed but the other blocks in my drawing weren't changed automaticly (maybe somebody can tell me why?). Last videopad video editor and movie maker for mac. So then it's to battman and sync the block.

Noobs need to understand that locks are not associated with blocks, not associated with methods, and not associated with variables. I've lost count of how many times I've seen them ask, 'how is it possible that two threads got into this same synchronized block/method at the same time?'

Or, 'How is it possible that two threads both synchronized on count at the same time?' They need it spelled out very clearly that the only thing synchronized prevents is two threads locking the same instance at the same time. – Jul 10 '15 at 14:27. Yes there is a difference in the options.

In the above option, two threads cannot call getCount at the same time, in the below one they can. Yes, that is correct.

There can only be one thread at the same time holding a lock on an object. Each object has its own lock.

Block By Block Job Application

So it lock all synchronized (this) block of that object. Note, however, that each object has a lock of its own and also each class has a lock of its own. In the constructor you use the object lock to access a static (class) variable, while in getCount you use the class lock. That means that your code is not thread-safe! Is there a difference between the two options in the code? Yes, there is clear difference. In first, you are synchronizing threads access to getCount method on the class object of ObjectCounter.

Block: block edit locked all block instances meaningEdit

While in second you are not. If I lock 'this' shouldn't it means that I can't call getCount until the contractor exit the synchronized block (lets say if I don't write synchronize on the getCount). Since there is only one lock of an object (class locks are different which are held through using static keyword along with synchronized), so if some other thread is acquiring that lock either because of synchronized(this) or because of this synchronized long getCount then the new thread trying to acquire the lock has to wait until the previous thread has released the lock. Now since in your case, you are doing, static synchronized long getCount, so, its locking becomes different from synchronized(this). Which means that if some thread is acquiring a lock because of synchronized(this) and some other thread is trying to invoke getCount then that thread will not be blocked.

If I do a synchronized block in some place in the code, does it locks the only the synchronized block or all the 'this' code?. Non-static synchronization: If you do synchronized block in some place in the code and it is non-static public synchronized long getCount, then also the lock of your object will be held, so new thread trying to acquire the lock has to wait until the previous thread has released the lock. Static synchronization: If you do synchronized block in some place in the code and it is static public static synchronized long getCount, then it will have no effect on lock of non-static sychronization.

Block: Block Edit Locked All Block Instances Of Voter

Bottom line:. There is only and only one lock for one object, and if that lock is acquired by some thread then other threads has to wait until that lock released. Then there is a class lock, which is held if static keyword is used along with synchronized keyword.