Embedding threaded Python in C

2005-08-21 Thread Richard
I've tried embedding Python in a C app so that Threading is done in the Python side. In the simple example below, unless I uncomment the ALLOW_THREADS macros, the Python thread does nothing until the C for-loop finishes. My real-world example is a large C/Motif application - apart from scatterin

Re: Embedding threaded Python

2005-04-13 Thread Tom Cocagne
You only need to call PyEval_InitThreads() for multithreaded C-code. The Python threads operate on a different principle. Tom Ricardo wrote: > If I embed Python in a C app and the Python code is threaded, but the C > code isn't, do I need to call PyEval_InitThreads() ? - or do you only need >

Embedding threaded Python

2005-04-12 Thread Ricardo
If I embed Python in a C app and the Python code is threaded, but the C code isn't, do I need to call PyEval_InitThreads() ? - or do you only need to do that if the C code is threaded ? -- http://mail.python.org/mailman/listinfo/python-list