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

Re: [pygame] BUG: pygame.event.peek



On 7/31/06, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
On 7/30/06, Tim Ansell <mithro@xxxxxxxxxx> wrote:
> since peek is a kind of silly unthread safe function, maybe that
> functionality should be removed.
>
Rene, what do you mean about it being unthread safe? are you just
talking about the implementation of it, or something about the idea of
peeking at the event queue? I don't see how peeking the queue could be
inherently less thread-safe than pulling events off


Hi,

I think because you peek at the event something could in the mean time
get the event.  I haven't tested this myself, but this is from the
report of the fastevent guy that tested the threadsafeness of SDL
events.  It's written somewhere on his page.