Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Infinite loop yet no loop

by gjb (Vicar)
on Mar 18, 2004 at 19:07 UTC ( #337769=note: print w/replies, xml ) Need Help??

in reply to Infinite loop yet no loop

Are you sure the root of the tree is added? If not, and you don't handle this, nothing will ever be added.

Just my 2 cents, -gjb-

Replies are listed 'Best First'.
Re: Re: Infinite loop yet no loop
by bart (Canon) on Mar 18, 2004 at 20:22 UTC
    Goog thinking.

    To the OP: keep track of whether anything changed in the loop, otherwise it's time to abort. For example keep track of the count of items in the buffer, and if it's the same before and after the iteration, nothing has changed, and it's useless to go on.

Re: Re: Infinite loop yet no loop
by ido50 (Scribe) on Mar 18, 2004 at 19:26 UTC
    Yes, the root is always created and is kind of a dummy entry.

    Live fat, die young

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://337769]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2018-05-27 18:31 GMT
Find Nodes?
    Voting Booth?