Reply to comment

Re: prevent stack overflow

Yes you could use setTimeout although the documentation for setTimeout actually recommends a Timer over setTimeout but they are specific as to why. I suspect it is because under the covers setTimeout creates a Timer anyways. IMHO AsyncDispatcher is a cleaner approach as it encapsulates the timer in a seperate class and is reusable.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options