[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Threads
Toni Alatalo wrote:
i'm doing that too in networked systems - Pete did show me a while back
how to do non-blocking downloading without threading using select, which
even works on windows for socket connections (but not local files i think,
unlike on posix),
http://www.tol.oulu.fi/~antont/programming/singlethreaddownload.py
.. but still afaik urllib2.urlopen() can block if e.g. the connection is
laggy or something, so can't have that regularly in the same thread that
is moving graphics / playing video / .. so am still using threads. would
like to get rid of that tho, perhaps to have the networking in a separate
process, but controlling processes did not seem to be that well supported
on windows (forking, killing etc) when last looked at it (am hopefully
wrong)
I'm trying to build a sort of chat client that will work with a direct
connection, possibly a null modem cable. Should I be looking at this
"thread" concept? I built a working version using the sockets module,
then heard that I should be treating a null-modem connection as a
file... somehow.
Kris
www.livejournal.com/users/niss_the_ai