[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: pygame networking



Hello,

You can't kill a thread in python.

Check out the sockets page in the docs for some ways around blocking.
http://docs.python.org/lib/socket-objects.html

There's some options on python sockets for settimeout, and
setblocking.  So you can use non blocking stuff inside a thread too.

For debugging threaded programs it is useful to be able to run all of
the code within one thread if possible.  That way you can take the
threading issues out of the debugging.  As with one thread, your
program is serial again.

Check out flup for one example of a threaded server...
http://svn.saddi.com/flup/  It uses a threadpool.


On 6/6/06, Bryce Allen <pygame@xxxxxxxxxx> wrote:
I have Trac/svn for my pygame networking project, courtesy of webfaction.com.
Here is the URL:

http://pygamenetworking.python-hosting.com

I haven't had much time to work on the project, but I did post some code. At
the moment I'm trying to figure out how to properly kill off a thread that's
blocking on socket calls. Does anyone have a simple example of threading with
the python socket API?

Thanks,
Bryce