Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Embedding threaded Python

Reply
Thread Tools

Embedding threaded Python

 
 
Ricardo
Guest
Posts: n/a
 
      04-12-2005
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 ?
 
Reply With Quote
 
 
 
 
Tom Cocagne
Guest
Posts: n/a
 
      04-13-2005
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
> to do that if the C code is threaded ?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Embedding Python in a multi-threaded C++ application Mustafa Demirhan Python 0 11-09-2004 10:08 PM
Embedding Python in a multi-threaded C++ application Mustafa Demirhan Python 0 11-09-2004 07:06 PM
Embedding Python in a multi-threaded C++ application Mustafa Demirhan Python 0 11-09-2004 06:49 PM
Embedding Python in a threaded app Jesper Nilsson Python 0 11-03-2003 04:56 PM
Re: Embedding Python in multi-threaded app Harri Pesonen Python 0 09-04-2003 01:11 PM



Advertisments