I understand how
thread work, and I understand how listeners work.
But I get confused when I see listeners that are also threads.
(Code that implements the runnable interface and a listener interface.)
If the listener is listening for a certain action, the corresponding method for the action is called when the action occurs.
When is the run method called if the thread does nothing but sit and listen?
What will happen if the tread is asleep when the action occurs?
Will the run method ever try to run while one of the action methods is running?