posted 20 years ago
Every object has a lock, and every class has a lock.
Synchronized code requires that an executing thread acquire the lock before it can invoke the code.
So in other words, synchronized code does not need to be in a Thread object, but it does regulate how different threads are able to invoke that code.
Does that make sense?
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org