1.Thread Safety
—–Points of discussion and confusion=no specific requirement———
//trainsient conpputition is stored in thread’s stack (vs state or field accessed by all threads) and are only accseibnle to threads So Safe.
Deep Ans and Analysis required:
Reentrancy : is it possiblr that thw same thread can aquire the lock again while already holding the same lock.
Point of confusion : Lock is acquired when sync method if invoked(Posix Thread[pThread] scenario),
Probable Ans: New concept where the lock is acquired ny thread (on which event?)
Note:intrinsic lock are reentranct(lock on per thread basis)
TODO:
Question 1:
Lock , by whom the locks(on object) are acquired?
It is known that the locks are relieved when they complete the executiiom
Statement: if intrinsic
locks were not reentrant, the call to super.doSomething would never be able to
acquire the lock because it would be considered already held,
Page:27