uninitialize PyEval_InitThreads()

B

Bob Rossi

Hi,

I see that I can initialize python for multi thread support by
calling PyEval_InitThreads().

I'm under the impression that when the GIL is turned on, python
can slow down a measurable amount.

Since I only need to use multiple threads for a portion of my
program, after I call PyEval_InitThreads() and use the threads,
is there a way to disable multi threading support in python?
(I noticed that _PyEval_FiniThreads was undocumented and
presumably shouldn't be called)

I would only want to do this if it would increase run time
performance in the main thread. So if that assumption is wrong,
please let me know.

Thanks,
Bob
 

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,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top