kiranvizru / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

GIL is not released #177

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I realized that almost in all of our C code base we're not releasing the GIL 
when we are supposed to, which is every time we are invoking a system call 
which might be blocking.
Py_BEGIN_ALLOW_THREADS / Py_END_ALLOW_THREADS macros should be used around all 
these calls.

Original issue reported on code.google.com by g.rodola on 30 Jun 2011 at 9:20

GoogleCodeExporter commented 9 years ago
Thinking back, this should only apply to functions which *effectively* can take 
a long to complete such as disk-related functions and maybe get_connections().
In all other cases releasing the GIL is unnecessary.
Closing out as invalid. =)

Original comment by g.rodola on 30 Jun 2011 at 9:48