Not being satisfied with the Toolkit.getDefaultToolkit().beep() sound I played around with some MIDI code till I got a sound I was happy with. All was well and good until I tried to make it multi-threaded. My app that uses it launches a couple of threads and I play a Beep when they end. It is highly unlikely that any two threads would Beep at the same time but I thought I should take that into consideration so I introduced
into the beep() method. This caused the beep() to no longer work. Can anyone tell me why?
Silently eating Exceptions is a REALLY bad practice. Yes, I know, this is a "safe" case, but at a minimum you should print a "thread interrupted" message or something. If you just swallow Exceptions, they can become Mysteries. Really, really frustrating Mysteries.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer