[capi-sig] Threading

Hrvoje Niksic hniksic at xemacs.org
Wed Sep 5 09:55:28 CEST 2007


"Pablo Yabo" <pablo.yabo at gmail.com> writes:

> I 'solved' the issue in that way. When I enter to any function of my
> library I release the interpreter lock and then I get it again.

OK, that is what I proposed.

> It's not the best solution but it's acceptable. The problem is that
> Python code cannot use any native wait or suspend function.

What do you mean by "native wait or suspend"?  When entering blocking
OS calls such as os.wait, or even the stdio IO code, Python tries to
release the interpreter lock, to enable other threads to run at the
same time.

> I wonder if why this issue is not fixed.

Because it is very hard to fix without slowing down the interpreter
for the single-thread case.


More information about the capi-sig mailing list