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

Re: [pygame] SOC Proposal: Networking for Pygame



On Mon, 2006-05-08 at 01:59 -0700, Bob Ippolito wrote:
> select.select blocks exactly no longer than you ask it to.  
> pygame.event.get blocks until it gets an event. For an application  
> that mostly just waits for events (mouse, keyboard) via  
> pygame.event.get is not going to interoperate well with network  
> events if it only polls the network after some user input.

The whole point of select is that a single threaded application can do
nonblocking IO. There aren't any real games that use pygame.event.wait()
because it means you can't have any animation. So there shouldn't be any
sleeping or blocking the networking or input needs to interrupt each
other.

I would still prefer to see a single threaded solution. But as long at
it is transparent (like SDL_mixer) I don't have a problem with threads.