Peter,

check (DefaultQueue.java):

    public QueueElement dequeue()
    {
        QueueElement element = null;

        try
        {
            m_mutex.attempt( m_timeout );  <<< What if it fails?

            if ( size() > 0 )
            {
                element = (QueueElement) m_elements.remove();
            }
        }
        catch ( InterruptedException ie )
        {
        }
        finally
        {
            m_mutex.release();
        }

        return element;
    }


I think it should be:

    public QueueElement dequeue()
    {
        QueueElement element = null;

        try
        {
            if (m_mutex.attempt( m_timeout ))
            {
                if ( size() > 0 )
                {
                    element = (QueueElement) m_elements.remove();
                }
            }
        }
        catch ( InterruptedException ie )
        {
        }
        finally
        {
            m_mutex.release();
        }

        return element;
    }

The same thing exist in several dequeue methods: The return value from
m_mutex.attempt is ignored.

See if this causes the problem you describe.

/LS


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to