On Mon, Jul 07, 2014 at 08:53:35AM -0500, Serge Hallyn wrote: > Quoting Dorian Eikenberg ([email protected]): > > Hi, > > > > attaching to a container using attach_wait from python-lxc blocks all other > > threads since it is not GIL-aware. > > This can be a problem if you want to run a timer thread, which stops the > > container after a certain timeout has occured. > > I've provided a solution below: > > > > Could you please add a Signed-off-by line? You can add > > Acked-by: Serge E. Hallyn <[email protected]> > > below that. > > The lxc part of the api code is thread-safe, so if there is a more > general way to tell python to always allow threads, that would be > good too.
He did add a Signed-off-by to the e-mail, just not in the header :) Acked-by: Stéphane Graber <[email protected]> > > > diff --git a/src/python-lxc/lxc.c b/src/python-lxc/lxc.c > > index 1bc977a..91c199f 100644 > > --- a/src/python-lxc/lxc.c > > +++ b/src/python-lxc/lxc.c > > @@ -581,7 +581,9 @@ Container_attach_and_possibly_wait(Container *self, > > PyObject *args, > > goto out; > > > > if (wait) { > > + Py_BEGIN_ALLOW_THREADS > > ret = lxc_wait_for_pid_status(pid); > > + Py_END_ALLOW_THREADS > > /* handle case where attach fails */ > > if (WIFEXITED(ret) && WEXITSTATUS(ret) == 255) > > ret = -1; > > > > > > Signed-off-by: Dorian Eikenberg <dorian.eikenberg at uni-duesseldorf.de> > > > _______________________________________________ > > lxc-devel mailing list > > [email protected] > > http://lists.linuxcontainers.org/listinfo/lxc-devel > > _______________________________________________ > lxc-devel mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-devel -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: Digital signature
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
