0

I am fixing a big application that has lots of code that blocks the main thread by accessing the filesystem or the network, probably because the original developer did not get a warning from Java Swing when developing it.

Is there a way to get a warning if some code is blocking the main thread in Java Swing?

I would like to see https://developer.android.com/reference/android/os/StrictMode.html for Java Swing.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Eduardo
  • 2,327
  • 5
  • 26
  • 43
  • Possible duplicate of [this](https://stackoverflow.com/q/45223828/230513). If this is not a duplicate, please edit your question to include a [mcve] that shows your revised approach based on the duplicates cited. – trashgod Jul 20 '17 at 23:14
  • @trashgod The question you are citing was not a duplicate of this one, but of others. That question was removed anyway. – Eduardo Jul 21 '17 at 05:41
  • Voting to undelete that [question](https://stackoverflow.com/q/45223828/230513) as a useful reference for EDT violations. – trashgod Jul 21 '17 at 06:46
  • [Profile](http://stackoverflow.com/q/2064427/230513) to characterize latency; use `SwingWorker`, [_et al._](https://stackoverflow.com/q/21905494/230513) to manage it, . – trashgod Jul 21 '17 at 06:50
  • @trashgod I have undeleted that question, but please, give positive points to it or the admins will delete it. – Eduardo Jul 22 '17 at 12:59
  • Sorry, I'm not your down-voter; you might be able to salvage that question by addressing some particular approach you tried, e.g. `CheckThreadViolationRepaintManager`. I see now that this question is different; any progress profiling? – trashgod Jul 22 '17 at 16:44

0 Answers0