Re: Bug#691765: Bindings don't seem to release the GIL when doing I/O
Sebastian Harl <[email protected]> Fri, 25 Apr 2014 21:24:40 +0200
| Newsgroups | gmane.comp.db.rrdtool.devel |
|---|---|
| Message-ID | <[email protected]> |
forwarded 691765 [email protected] thanks Hi, On Mon, Oct 29, 2012 at 02:49:03PM +0100, Enrico Zini wrote: > I was auditing the rrdtool binding code to check if they could be used > in a python thread without locking the entire application via the GIL. > > Extensions are supposed to release the GIL lock around potentially > blocking I/O operations like reading or writing a file, so that other > Python threads can run in the meantime. > > I went through rrdtoolmodule.c and didn't see any use of > Py_BEGIN_ALLOW_THREADS or thread-related functions, so it looks like > python-rrdtool would keep all concurrent threads of the application > blocked during I/O. > > http://docs.python.org/2/c-api/init.html#threads has more details. > > This isn't an urgent issue for me personally: we're using pyrrd > through the 'external' backend, which uses Popen to invoke rrdtool, and > Popen correctly releases the GIL during I/O. However, I felt like I > should share what I found during my little code review. Thanks for sharing this. With this email, I'm forwarding the issue to the upstream developers mailinglist for further attention. Cheers, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin _______________________________________________ rrd-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlNatngACgkQEFEKc4UBx/ya3gCdGF7gLSr0XchMze+4sATFrbc8 n34An1OrmUi4J20R9HkxnTEtNsNM9wqF =qgpa -----END PGP SIGNATURE-----