On May 10, 2009, at 15:19 , kyriakos zarifis wrote:

I was wondering if someone came up with an answer to this old thread: http://www.mail-archive.com/[email protected]/msg00068.html When I create a new python thread through the nox app, it seems like it initially runs for a really short period and then hangs - as if it only runs for the first timeslice allocated by the scheduler? - and the control remains on the main app thread from that point on. The controller functions as expected, e.g. it responds to events, but the child python thread looks dead/sleeping.
Is there any reason why nox would affect the new thread in this case?

Contrary to what the original thread suggests, I think Python has used native threads for sometime instead of green threads. While I don't know the details of Python threading C APIs, my understanding is that this comes with certain responsibilities: a) special initialization procedures and b) GIL (Global Interpreter Lock) management in C/C++ for any code entering Python. If you don't properly take care of a) and b) (and NOX platform doesn't), the side-effects could be anything, for instance something like you describe.

Moving forward, we have some plans to decouple Python and C++ into separate processes to have support for Python threading.

_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to