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

Re: [pygame] broken links, event handling vs "getting directly" and screen refresh



Dan Stromberg wrote:
> After thinking things through more carefully, I'm realizing that my
> screen-update thread really only needs to pygame.event.pump() and
> time.sleep().  Are these re-entrant?  It seems to be working fine
> without a semaphore, but should I add one?

the event, mixer, and time modules are all thread safe. you can work 
with them from any thread and be ok. the other modules can only be 
handled from one thread at a time, so you'll need your own locking to 
wrap them.



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