[OLPC-Games] Advisory on olpcgames.mesh.get_buddy() and event type exhaustion

Mike C. Fletcher mcfletch at vrplumber.com
Thu Jan 31 14:45:05 EST 2008


This function, as currently coded, is violating the threading barrier 
when called from Pygame code.  That results in core dumps on my machine, 
and it would cause problems at all times.  The interface requires dbus 
calls, so it should be asynchronously coded, that is, it should take a 
callback, *not* return a result immediately.  If you are using this 
function from your Pygame code (as distinct from PyGTK code), be advised 
that you *will* need to recode your usage to use a new API I'll be 
adding ASAP.  No DBUS-based call should be happening in the Pygame 
thread, it just isn't ever going to be safe.

As part of fixing this I'm likely going to have to rework the set of 
event types in OLPCGames (we're using all the free officially-recognized 
event type integers already)... which is to say, we're probably looking 
at an OLPCGames 2.0 release in the near future.  Just a heads up for 
now, I'll post about a new API when I have one.

Take care,
Mike


More information about the Games mailing list