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

Re: [pygame] SOC Proposal: Networking for Pygame



On 5/8/06, Bob Ippolito <bob@xxxxxxxxxx> 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. Ideally
for those sorts of applications you would like the network to also
send an event asynchronously to wake up the event loop. That is only
possible with an additional thread given how SDL works.

Ah I see. It seems like a separate thread is going to be an unfortunate necessity.

-Sw.