The Java documentation says that \"it is not possible for two invocations of synchronized methods on the same object to interleave\". What I need to know is whether synchro
Not unless the method is static
. A synchronized
non-static method takes a lock on the object (instance) on which it is invoked, not on the class.
A synchronized static method takes a lock on the class, so that could help - but it's often not very practical.
What you could do is have a static member object in your class, and do a synchronized block on that (class-global) object in your process
method.