C-thread calling Python



Hi,

I am facing a problem that I hope some of you could help me solve. I
have a third-party library written in C based on GObject. This library
exports a class that is meant to be subclassed in C or Python. After
some initialization, a manager (written in C) creates one thread per
instance and calls a method of this associated instance and waits
until all calls are finished. This works fine in C and Python as long
as the subclasses are written in C. However, if written in Python the
method is called but execution is blocked. I guess Python's GIL is the
root of this problem, because the interpreter is still holding the
lock and the subclass instances are never able to acquire it.

Does anybody have an idea, how to solve this?

Regards,
Matthias

-- 
Matthias Vogelgesang
Public-Key: http://tinyurl.com/2qcydl


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]