[MERGE/RFC] Add transport jail to bzr smart server; add ignore_fallbacks option to BzrDir.open_branch

Andrew Bennetts andrew.bennetts at canonical.com
Thu Mar 26 09:13:41 GMT 2009

Robert Collins wrote:
> On Thu, 2009-03-26 at 09:17 +0100, Vincent Ladeuil wrote:
> > 
> > What I still don't get is why you use a per thread data instead
> > of just a global one ? You have a use case where different jails
> > are needed inside the same process ? Outside the test suite ?
> The server is multithreaded. Each thread gets jailed separately.

To elaborate on this point: when you do “bzr serve” to create a TCP bzr
server, bzr instantiates a bzrlib.smart.server.SmartTCPServer.  That class
creates a thread for every accepted TCP socket.  So it's possible for bzrlib
to be serving multiple requests concurrently, but they will each be in their
own thread.

For “bzr serve --inet”, which handles bzr+ssh (and TCP if launched from
inetd) then there's only one thread, but we do want plain “bzr serve” to
work just as well.


More information about the bazaar mailing list