473,480 Members | 1,777 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Re: multirhreading&boost.python

En Sun, 04 May 2008 11:56:14 -0300, joop renes <jj******@hccnet.nlescribió:
i hope this is the right list for the following question of a c++
hacker,python newbie. i have a library in c++ to which i want to add a
python GUI and other python stuff.The library has multithreading
components, while python uses a reference counted memory model. Usually
mixing reference counting with multithreading is frowned upon, at least
in the c++ world. what am i to expect in the python world, if i bring
multithreading c++ into it? just performance penalty or total disaster?
best regards
Python objects are reference counted, *and* you can have many threads running. This is not a problem in itself; Python has a Global Interpreter Lock (GIL) that ensures that addref/releases are properly handled. Only one thread at a time can execute Python code; but your C++ library can use as many threads as you want - as long as they don't call Python code again without reacquiring the GIL.

--
Gabriel Genellina

Jun 27 '08 #1
0 898

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
871
by: joop renes | last post by:
hi, i hope this is the right list for the following question of a c++ hacker,python newbie. i have a library in c++ to which i want to add a python GUI and other python stuff.The library has...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7048
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6741
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5342
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4783
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2997
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2986
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
183
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.