Sockets and threads
Peter Hansen
peter at engcorp.com
Wed Jun 11 06:35:50 EDT 2003
More information about the Python-list mailing list
Wed Jun 11 06:35:50 EDT 2003
- Previous message (by thread): Sockets and threads
- Next message (by thread): Sockets and threads
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message (by thread): Sockets and threads
- Next message (by thread): Sockets and threads
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list