[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] sockets and events



> This seems the most appealing option, especially if I can
> just start up a simple thread and then forget about it.
> 
> So, how do I do threads? Would something like this work :

your little code for threads looks pretty correct. i've
heard many people say to stick with the "threading" module.
which just takes the "thread" module and wraps it into a
class. you simply create a function that runs in the thread,
then pass that function to the class constructor. i've
never tried it threads with straight "thread" only with
the "threading" module, so i can't really compare.


> Also, is it ok to just keep using the same event over and
> over again?

theoretically.. yes. hopefully theory holds up in the
"real world" :] 


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org