473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

What is situation with threads in Python

Hello Mark,

I took your three day course here at JPL and recall that you said
something was wrong with the implementation of threads within Python
but I cannot recall what. So what is wrong with threads in Python?

The other part of this question is, if there is something wrong with
the threads in Python has anyone wrapped the Posix threads C api using
swig to fix this problem? I work on Solaris/Linux systems and this
seems like a quick fix - maybe.

Enjoyed the class a great deal. I am also sending this to the news
group in hopes of various interesting replies. Maybe there is a web
article on this topic already that someone could send the URL.

Thanks for all replies,

Len
--
__________________________________________________ __
Leonard J. Reder
Jet Propulsion Laboratory
Interferometry Systems and Technology Section 383
Email: re***@huey.jpl.nasa.gov
Phone (Voice): 818-354-3639
Phone (FAX): 818-354-4357
Mail Address:
Mail Stop: 171-113
4800 Oak Grove Dr.
Pasadena, CA. 91109
---------------------------------------------------
Jul 19 '05 #1
1 1202
On 4/25/05, Leonard J. Reder <re***@jpl.nasa.gov> wrote:
Hello Mark,

I took your three day course here at JPL and recall that you said
something was wrong with the implementation of threads within Python
but I cannot recall what. So what is wrong with threads in Python?
I'm going to guess that he meant the Global Interpreter Lock is what's
wrong with Python threads. You can read about it in the docs at
http://docs.python.org/api/threads.html and get some good analysis
from Ian Bicking (with some excellent, and some not so excellent,
comments): http://blog.ianbicking.org/gil-of-doom.html .

The other part of this question is, if there is something wrong with
the threads in Python has anyone wrapped the Posix threads C api using
swig to fix this problem? I work on Solaris/Linux systems and this
seems like a quick fix - maybe.

Nope, since the interpreter is not entirely thread-safe, I don't
believe you can wrap pthreads.
Enjoyed the class a great deal. I am also sending this to the news
group in hopes of various interesting replies. Maybe there is a web
article on this topic already that someone could send the URL.

Thanks for all replies,

Len
--
__________________________________________________ __
Leonard J. Reder
Jet Propulsion Laboratory
Interferometry Systems and Technology Section 383
Email: re***@huey.jpl.nasa.gov
Phone (Voice): 818-354-3639
Phone (FAX): 818-354-4357
Mail Address:
Mail Stop: 171-113
4800 Oak Grove Dr.
Pasadena, CA. 91109
---------------------------------------------------
--
http://mail.python.org/mailman/listinfo/python-list

Jul 19 '05 #2

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

Similar topics

54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
3
by: Ronan Viernes | last post by:
Hi, I have created a python script (see below) to count the maximum number of threads per process (by starting new threads continuously until it breaks). ###### #testThread.py import...
11
by: Przemysław Różycki | last post by:
Hello, I have written some code, which creates many threads for each connection ('main connection'). The purpose of this code is to balance the load between several connections ('pipes'). The...
4
by: Steve Horsley | last post by:
I am trying to start two threads to do some time consuming work. This is my first stab at threading, and it isn't working as I expect. Instead of the threads starting when I call start(), they seem...
29
by: Jeffrey Maitland | last post by:
Hello all, I am in the process of writing a multithreading program and what I was wondering is a sleep command in an executing function will affect the threads below it? Here is a basic example...
41
by: Carl J. Van Arsdall | last post by:
Hey everyone, I have a question about python threads. Before anyone goes further, this is not a debate about threads vs. processes, just a question. With that, are python threads reliable? Or...
4
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
19
by: jsanshef | last post by:
Hi, after a couple of days of script debugging, I kind of found that some assumptions I was doing about the memory complexity of my classes are not true. I decided to do a simple script to...
167
by: darren | last post by:
Hi I have to write a multi-threaded program. I decided to take an OO approach to it. I had the idea to wrap up all of the thread functions in a mix-in class called Threadable. Then when an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...
0
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...

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.