_rwl.debug();
    private void addUrl(HttpUrl url) {        try {            _rwl.readLock().acquire();            try {                if (!_store.isKnownUrl(url)) {                    HttpUrl[] path = url.getUrlHierarchy();                    for (int i=0; i<path.length; i++) {                        if (!_store.isKnownUrl(path[i])) {                            _rwl.readLock().release(); // must give it up before writing                            // XXX We could be vulnerable to a race condition here                            // we should check again to make sure that it does not exist                            // AFTER we get our writelock                                                        // FIXME There is something very strange going on here                            // sometimes we deadlock if we just do a straight acquire                            // but there does not seem to be anything competing for the lock.                            // This works, but it feels like a kluge! FIXME!!!                            // _rwl.writeLock().acquire();                            while (!_rwl.writeLock().attempt(5000)) {                                _logger.severe("Timed out waiting for write lock, trying again");                            }                            if (!_store.isKnownUrl(path[i])) {                                _store.addUrl(path[i]);                                _rwl.readLock().acquire(); // downgrade without giving up lock                                _rwl.writeLock().release();                                fireUrlAdded(path[i]); // fire with read lock held, so listeners can update themselves                                _modified = true;                            } else { // modified by some other thread?! Go through the motions . . .                                _rwl.readLock().acquire();                                _rwl.writeLock().release();                            }                        }                    }                }            } finally {                _rwl.readLock().release();            }        } catch (InterruptedException ie) {            _logger.severe("Interrupted! " + ie);        }    }