A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-September/038082.html below:

[Python-Dev] Making python C-API thread safe (try 2)

[Python-Dev] Making python C-API thread safe (try 2) [Python-Dev] Making python C-API thread safe (try 2)Pat Miller patmiller at llnl.gov
Tue Sep 16 12:24:45 EDT 2003
I used to work on the SISAL compiler which was a fine-grained parallel
functional language.  It reference counted its allocated data.

Updating the reference count is a critical section.
We were spending 40% of our time blocked for reference counting on only 4 threads.

We eventually taught the compiler to do reference count optimizations
(e.g. put all readers of an object before the writers), but these
optimizations are not suitable to the Python interpreter.

With this same reasoning, you can infer why C++ smart pointers are
also a bad idea for threaded code.

Pat


-- 
Patrick Miller | (925) 423-0309 | http://www.llnl.gov/CASC/people/pmiller

All you need in this life is ignorance and confidence, and then success is
sure. -- Mark Twain


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4