[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: Re: Sockets and threads
From: Peter Hansen <peter () engcorp ! com>
Date: 2003-06-11 10:35:50
[Download RAW message or body]
Byron Morgan wrote:
>
> If I monitor a socket connection or even jsust listen to a socket in a
> thread, Python's cpu usage expands to use all available processor time.
Let me guess. Are you using non-blocking sockets and polling them
to see if there's anything to read? This is a very poor way to do
whatever you're trying to do. One thing to investigate would be
the select module. Please post example code to clarify your question.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic