Originally posted by Priyam Srivastava: only threads can acquire lock on objects...Objects themselevs donot owe any lock.
That's not correct. A lock is acquired by using synchronization, which can be done in any class, not just threads.
Of course, all code runs inside of a thread, even single-threaded code, so in that sense locks are always associated to threads. But I don't think that was what you meant. [ July 13, 2007: Message edited by: Ulf Dittmer ]
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad: