On Jul 23, 12:15 pm, "Jaimy Azle" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote:
> > I fixed the code. This code snippet runs in a seperate thread:
>
> > PyObject *dict=NULL;
> > PyGILState_STATE state = PyGILState_Ensure();
> > dict = CreateMyGlobalDictionary();
>
> > PyRun_String(, Py_fi
<[EMAIL PROTECTED]> wrote:
> I fixed the code. This code snippet runs in a seperate thread:
>
>
> PyObject *dict=NULL;
> PyGILState_STATE state = PyGILState_Ensure();
> dict = CreateMyGlobalDictionary();
>
> PyRun_String(, Py_file_input, dict, dict);
>
> ReleaseGlobalDictionary(dict);
>
> But it s
Hi!
I fixed the code. This code snippet runs in a seperate thread:
PyObject *dict=NULL;
PyGILState_STATE state = PyGILState_Ensure();
dict = CreateMyGlobalDictionary();
Hi!
Thank you very much for your answers. I have a menue with a script in
it.
So my app starts a new thread for each script.
So I would like to run two scripts all the same time. Could someone
give me a tip,
what I have to set in my code?
Thank you :)
--
http://mail.python.org/mailman/listinfo/p
"Benjamin" <[EMAIL PROTECTED]> wrote:
> Two threads should not be running through the Python VM concurrently
> in the same process. The GIL has to be held *any* time you use the
> Python API. When you want to release the GIL (to process something in
> C), use PY_BEGIN_ALLOW_THREADS and
> PY_END_AL
On Jul 21, 6:56 am, [EMAIL PROTECTED] wrote:
> Hi :)
>
> I want to run Python in my app. That works still fine. But my app
> supports now Threads and I would like to know what to do, that it runs
> without problems.
>
> PyGILState_Release and PyGILState_Ensure should solve the problem
> right? Wher
Does anyone has a tip?
--
http://mail.python.org/mailman/listinfo/python-list
Hi :)
I want to run Python in my app. That works still fine. But my app
supports now Threads and I would like to know what to do, that it runs
without problems.
PyGILState_Release and PyGILState_Ensure should solve the problem
right? Where do I have to put this two commands around? between each
C