Norman Walsh <[email protected]> writes:
> I'll keep hacking at it.

Here you go. JenaStreamTest reads /tmp/badchar.ttl and hangs. It doesn't
*always* hang but it almost always does.

Here's what I think happens. In PipedRDFIterator we find this loop:

        while (true)
        {
            try
            {
                slot = queue.poll(ITERATOR_POLL_TIMEOUT, 
ITERATOR_POLL_TIMEUNIT) ;
            }
            catch (InterruptedException e)
            {
                throw new CancellationException() ;
            }

            if (null != slot)
                break ;

            // If the producer thread died and did not call finish() then 
declare this pipe to be "broken"
            // Since check is after the break, we will drain as much as 
possible out of the queue before throwing this exception
            if (writeSide != null && !writeSide.isAlive() && !closedByWriter)
            {
                closedByReader = true ;
                throw new RiotException("Write end dead") ;
            }
        }

But the writing thread dies before ever calling PipedRDFIterator.receive(), so
writeSide is null, the queue is empty, and we're stuck.

I'll be pleased as can be if this is just a case of me doing something wrong.

Attachment: JenaStreamTest.java
Description: Binary data

Attachment: badchar.ttl
Description: Binary data

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <[email protected]> | My life has a superb cast but I can’t
http://nwalsh.com/            | figure out the plot.--Ashleigh Brilliant

Attachment: signature.asc
Description: PGP signature

Reply via email to