|
Synchronized the enforceDelay() method so that multiple threads can't execute RTM methods concurrently. Not going to turn RtmService into a singleton for this, though. Turns out the solution does not work in all cases. Re-opening to see what else either needs fixing. Synchronized on the object that keeps track of the last time of a call to RTM. Added a test case to ensure this works. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
This problem only occurs with multi-threaded applications. Otherwise everything executes on the EDT enforcing the delay.