Invoking destroy() does not always terminate threads which prevents JVM from exiting.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
inotify-java |
Fix Committed
|
Medium
|
Nick Bargnesi |
Bug Description
final class QueueConsumer implements Runnable {
/**
* Service the monitor service's queue.
*
* @see java.lang.
*/
@Override
public void run() {
while (isActive()) {
try {
MonitorService.
@Override
public void run() {
while (isActive()) {
try {
is the droid we're probably looking for.
Changed in inotify-java: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Nick Bargnesi (nbargnesi) |
Changed in inotify-java: | |
status: | In Progress → Fix Committed |
In the same function I also see null pointer exceptions on exit from the following code (line marked *** )
*** pathWatchMap.
In the above case I'd de-registered all listeners and watches. I fixed this this (and the issue described above) with this patch:
714c710,713 remove( path); remove( path);
< InotifyEvent e = queue.take();
---
> InotifyEvent e = queue.poll(1, TimeUnit.SECONDS);
>
> if (e == null) continue;
>
744c743
< pathWatchMap.
---
> if (path != null) pathWatchMap.
BTW: Nice library.