Problems with thread safety

S

Sven Rech

Hi,

In my C program, I want to use python scripts. This scripts should also
have the ability to start threads.

So at the initilisation phase I do:
PyEval_InitThreads();
PyEval_ReleaseLock();

With the second call I want to release lock, for that the python threads
can also do their work.

But then, when I call a method in a script which starts a thread then, I
get the following error:
Fatal Python error: PyEval_AcquireThread: non-NULL old thread state
Aborted (core dumped)

What did I wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,785
Messages
2,569,624
Members
45,318
Latest member
LuisWestma

Latest Threads

Top