473,395 Members | 2,423 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,395 software developers and data experts.

good book on multithreaded programming with Python

Hi,

Any recommendation for a good book on multithreaded programming with Python?
O:-)

TIA
Jul 18 '05 #1
6 3262
In article <fv********************************@4ax.com>,
Fernando Rodriguez <fr*@easyjob.net> wrote:
Hi,

Any recommendation for a good book on multithreaded programming with Python?

Jul 18 '05 #2
cl****@lairds.com (Cameron Laird) writes:
Do you *really* want
concurrent programming with Python
or
programming with Python's threads
or
Python programming with low-level threads


Yes, please.

I'm not the OP, but right now I'm porting a C/C++ program from Win32
to Python on Linux and OS-X. The original program relies quite heavily
on threading.

A book that covers all the above options would really help me figure
out the optimal approach to this project. I'm especially concerned
that the GIL will make a pure-Python approach risky, since this
application involves a fair abount of network data and real-time data
processing.

As it is, I have to read several discussions of each
approach. Unfortunately, on this project learning time is not billable
time. (Fortunately, experimentation is billable, and with Python,
learning and experimenting are often one and the same...)

Nick

--
# sigmask || 0.2 || 20030107 || public domain || feed this to a python
print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
Jul 18 '05 #3
Nick Vargish wrote:

A book that covers all the above options would really help me figure
out the optimal approach to this project. I'm especially concerned
that the GIL will make a pure-Python approach risky, since this
application involves a fair abount of network data and real-time data
processing.


What risk concerns you with respect to doing networking and "real-time"
processing using Python, given that the GIL exists? Would you have the
same concerns if you didn't even know of the existence of the GIL?
(I believe you should have those concerns, but just because you're
trying to use an unfamiliar environment for something fairly intensive,
not because it's Python specifically, or the GIL.)

I do lots of "network data and real-time data processing" using Python
and have not encountered any particular difficulties, and certainly none
that can be attributed to the existence of the GIL.

Is this a case of fear arising out of ignorance? If so, why not just
write a quick test/experiment that will remove or affirm your concern?
It would be trivial to write a program that created a dozen threads,
each doing processing that would take five seconds of dedicated CPU time,
and a network thread which grabs data from an external source as it
becomes available, at whatever rate you need. You'll likely find out
that with an adequate CPU, everything will work just as you need it to,
and that the only difference between the old program and the new is that
the Python-based one consumes a lot more CPU time for the same data...

If you have specific reasons for the concern, please provide them so
we can address them. The GIL certainly doesn't get in the way of
soft real-time work in any way that's significant.

-Peter
Jul 18 '05 #4
A good book on writing multi-threaded applications is "Concurrent
Programming in Java" by Doug Lea. The focus is more on multi-threaded
applications than on Java.
Jul 18 '05 #5
On Wed, 19 Nov 2003 13:34:29 -0000, cl****@lairds.com (Cameron Laird) wrote:
In article <fv********************************@4ax.com>,
Fernando Rodriguez <fr*@easyjob.net> wrote:
Hi,

Any recommendation for a good book on multithreaded programming with Python?

.
.
.
Do you *really* want
concurrent programming with Python
or
programming with Python's threads
or
Python programming with low-level threads
or
...?


An introduction to general concurrent programming concepts, using python for
the examples.
Jul 18 '05 #6
Peter Hansen <pe***@engcorp.com> writes:
Is this a case of fear arising out of ignorance?
Most probably. On the other hand, I probably wouldn't have spoken up
if I hadn't seen the post I replied to.

I am planning on as pure Python an approach as possible, and have been
from the start. I certainly wasn't trying to borrow trouble from the
future or optimize too early in development.
If you have specific reasons for the concern, please provide them so
we can address them.
This is the attitude that makes me tell my boss(es) that I get better
support from the open source community than I ever could from a
commercial outfit. Thanks!
The GIL certainly doesn't get in the way of
soft real-time work in any way that's significant.


I'm going to proceed with that expectation, thanks again.

Nick

--
# sigmask || 0.2 || 20030107 || public domain || feed this to a python
print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
Jul 18 '05 #7

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

Similar topics

7
by: jodocus | last post by:
hi, I am new to python (but not to programming - have programmed in many other languages like C++/lisp/perl etc.) and I would like to buy a good book. The local bookstore has no books about...
5
by: John Ladasky | last post by:
Hi, folks, At the beginning of 2003, I was a frustrated computer user, and lapsed programmer, with problems to solve that screamed for programming. Thanks to the Python language and community, I...
4
by: Kanthi Kiran Narisetti | last post by:
Hi ALL, I am new to programming and python. In my quest to get good at programming, even when I am able to get through the python tutorials I feel for lack of exercises & examples that...
12
by: G. | last post by:
Hi all, During my degree, BEng (Hons) Electronics and Communications Engineering, we did C programming every year, but I never kept it up, as I had no interest and didn't see the point. But now...
1
by: Chris | last post by:
I need recommendations for a good source for jScript.net. I have no javascript background and would like to start with jscript. Does anyone have essam ahmed's book that they would like to sell ...
14
by: Protoman | last post by:
Is this a good use of fn ptrs? #include <iostream> #include <cstdlib> using namespace std; typedef void (*v_v_fptr)(); void Error(){cout << "Error" << endl;}
9
by: Katie Tam | last post by:
I am new to this filed and begin to learn this langague. Can you tell me the good books to start with ? Katie Tam Network administrator http://www.linkwaves.com/main.asp...
1
by: Chris Rebert | last post by:
I've heard good things about The Django Book: http://www.djangobook.com/ - Chris On Fri, Sep 12, 2008 at 5:57 PM, bhaarat Sharma <bhaarat.s@gmail.comwrote: -- Follow the path of the...
7
tharden3
by: tharden3 | last post by:
I've tried using several online tutorials, and most of them are great, but I'd like to have a good Python book on hand. Any suggestions? One of my weak spots mentally, is that it has been hard to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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
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
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
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,...

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.