On 11.07.2013 18:04, Michael Pruemm wrote: > Branko Čibej <brane <at> wandisco.com> writes: > >> No. Pools encapsulate all resource management -- including file handles >> and sockets (connections), not only allocated memory. >> >> This document explains how pools should be used: >> >> http://subversion.apache.org/docs/community-guide/conventions.html#apr-pools >> >> In your example, you should be using an iteration pool. >> > Yes, that's what I did. It was more that I was somehow expecting the "ls3" > connection to be reused instead of always creating a new one.
The libsvn_client interface creates a new connection for each operation. If you need complete control over connection management, you'll have to use libsvn_ra. > The document also says: > > "Whenever an unbounded iteration occurs, an iteration subpool should be used." > > What is considered "unbounded iteration" here? I always thought that "for i > = 1 to N" was considered a bounded loop, and "while (condition)" unbounded. "Unbounded" in this context is anything where the number of iterations depends on some condition that is not known at compile-time. If the number of iterations is constant, that's not unbounded. If it depends, for example, on the number of modified files in a working copy, then it is "unbounded" since you cannot predict an upper bound on the number of iterations and, as a consequence, on the associated resource usage. -- Brane -- Branko Čibej | Director of Subversion WANdisco // Non-Stop Data e. br...@wandisco.com