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

[help]problem with python thread

Hi,all:
Could someone explan the python thread to me?
When I use the python thread,I find some problems.If I run many
(such as 100) python threads ,then all thread are blocked.Below is the code:
import thread,time
def f():
print 'f()'

def loop():
while True:
f()

for i in xrange(100):
t=threading.Thread(target=loop)
t.start()

time.sleep(100000000)

I run this program on red hat linux.The intersting thing is that
the program sometimes works,but somtimes blocks(no output at all).

Oct 29 '05 #1
0 1314

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

Similar topics

3
by: Stangonline.com | last post by:
Ok, im familiar with typical troubleshooting of this type on problem, but I do not do any programming myself. Im hoping you guys can help me with an install problem that I am having. I have an...
1
by: wccppp | last post by:
Hello, I was trying to install pywin32 on one computer which has Python 2.4 installed and it failed. The error message I got was "Can't load Python for pre-install script". I tried...
5
by: pekka niiranen | last post by:
Does anybody know Python recipe for changing the date of the directory or files in W2K to current date and time? In UNIX shell command "touch" does it. -pekka-
4
by: PGMoscatt | last post by:
Hi all, Have just installed Fedora 3 and wish also want to give programming with Python a go. I wish to develop GUI interfaces and believe that 'Tkinter' is the way to go. After installing...
9
by: Lil | last post by:
Hi Everyone! I've been trying to figure out this weird bug in my program. I have a python program that calls a C function that reads in a binary file into a buffer. In the C program, buffer is...
5
by: japslam japslam via DotNetMonster.com | last post by:
Hi all, I have problem when I use HttpWebRequest and take long time to call to my service server. If at that time there are many request comes in semultaneous, I will get this exception ...
2
by: funkky | last post by:
Please 'am a new beginnger in python. I have been trying to solve these problems, but 'am always getting stuck. Can you please help me out: 1. numBuckets = 8 buckets = * numBuckets...
1
by: study37 | last post by:
Can someone please help with this. I just started to learn python yesterday. Create a python script that will batch copy the rasters from the python_examples folder into a new folder and then...
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
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?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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.