473,378 Members | 1,671 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,378 software developers and data experts.

python's thread problem on Linux platform

I found that multi-threaded program(io-centralize ) runs very slowly
on linux while the same program runs very quickly on windows.If I
change the thread number to one ,the program runs quickly on linux, in
fact the speed is quicker than the multi-threaded version .
It turns out that python's multi-thread support on linux has some
problems.Any comments?

Apr 22 '06 #1
2 1076
de*****@gmail.com wrote:
I found that multi-threaded program(io-centralize ) runs very slowly
on linux while the same program runs very quickly on windows.If I
change the thread number to one ,the program runs quickly on linux, in
fact the speed is quicker than the multi-threaded version .
It turns out that python's multi-thread support on linux has some
problems.Any comments?


Yes. There is a bug in your code.

--Irmen
Apr 22 '06 #2
de*****@gmail.com wrote:
I found that multi-threaded program(io-centralize ) runs very slowly
on linux while the same program runs very quickly on windows.If I
change the thread number to one ,the program runs quickly on linux, in
fact the speed is quicker than the multi-threaded version .
It turns out that python's multi-thread support on linux has some
problems.Any comments?


You are probably looping or have other quirks', over-lock-ing ...

Python's thread/threading/Queue stuff is unfortunately Java-ish/
OS-mindset and not functional. Thus encourages screwing "ego threads".

Maybe you get things organized frictionless with those 2? :

http://aspn.activestate.com/ASPN/Coo.../Recipe/491281
http://aspn.activestate.com/ASPN/Coo.../Recipe/491280

-robert
Apr 23 '06 #3

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

Similar topics

38
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.3.1 (final). Python 2.3.1 is a pure bug fix release of Python 2.3, released in...
0
by: Bruce Davis | last post by:
I'm having a problem on windows (both 2000 and XP) with a multi-threaded tkinter gui application. The problem appears to be a deadlock condition when a child thread pops up a Pmw dialog window in...
10
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. ...
0
by: Simon Brunning | last post by:
QOTW: "" - John Machin, snipping a section of Perl code. "What sort of programmer are you? If it works on your computer, it's done, ship it!" - Grant Edwards Guido invites us to comment on...
11
by: Grant Edwards | last post by:
I've read over and over that Python leaves floating point issues up to the underlying platform. This seems to be largely true, but not always. My underlying platform (IA32 Linux) correctly...
852
by: Mark Tarver | last post by:
How do you compare Python to Lisp? What specific advantages do you think that one has over the other? Note I'm not a Python person and I have no axes to grind here. This is just a question for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.