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

Re: [pygame] no unlock: surfarray.pixels2d() and PixelArray() bug or intented?



On, Sat Jun 07, 2008, Brian Fisher wrote:

> On Sat, Jun 7, 2008 at 1:19 PM, Marcus von Appen <mva@xxxxxxxxxxxx> wrote:
> 
> > After this manual unlock, the PixelArray is unlikely to work in any
> > case. You might expect weird behaviour in some cases, random
> > segmentation faults and other crashes on trying to access self.pixels
> > after the unlock. See my other mail about the why and how to avoid such
> > things.
> >
> > would it be good to try and turn that into an exception? like if the
> PixelArray would check the lock count or something?

Surfaces do not feature a tracking of lock counts at the moment. And
checking for an existing lock might mess up user intendend locking
behaviour, I think.

Usually one should stick to the docs about locks caused by objects async
methods :-).

Regards
Marcus

Attachment: pgpG6F1jNMGvd.pgp
Description: PGP signature