DirectoryListener now actually works. Thanks to Brian, I now know that the trick to get a thread out of a blocking system call is to invalidate the resource that it's blocking on. Crude, but works.