Re: Queue limitations?

2006-03-16 Thread mateom
I am creating the images by reading from texture memory using glGetTexImage(). As an experiment, I tried calling glGetTexImage() only once and letting imagQueue use that same reference over and over, but the images were all the same. So, this leads me to believe that the references returned by

Re: Queue limitations?

2006-03-16 Thread Metalone
This example is missing a few initialization details although they can possibly be inferred. For example is iq = imageQueue() but imageQueue does not have a put() method. Is SetQueue() called? Is iq.start() called? I like to see small, fully complete and tested examples. The following works using

Queue limitations?

2006-03-15 Thread mateom
Hello, I'm using Queue to send images from one thread to another, and some of the images are not appearing in the consumer threadmaybe 1 in 3 arrive. I've tried passing the image data in both string form and as a PIL Image object, with the same result. It does work, however, if I use zlib to

Re: Queue limitations?

2006-03-15 Thread Rene Pijlman
[EMAIL PROTECTED]: I'm using Queue to send images from one thread to another, and some of the images are not appearing in the consumer threadmaybe 1 in 3 arrive. I find that hard to believe. Could there be a bug in your program, somewhere, somehow? -- René Pijlman --

Re: Queue limitations?

2006-03-15 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I'm using Queue to send images from one thread to another, and some of the images are not appearing in the consumer threadmaybe 1 in 3 arrive. I've tried passing the image data in both string form and as a PIL Image object, with the same result. It does work,

Re: Queue limitations?

2006-03-15 Thread mateom
the queue holds references to the images, not the images themselves, so the size should be completely irrelevant.I use one instance of imageQueue. hmmm.. true. And it also fails when I use PIL Image objects instead of arrays. Any idea why compressing the string helps? I'm using one instance of

Re: Queue limitations?

2006-03-15 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: the queue holds references to the images, not the images themselves, so the size should be completely irrelevant.I use one instance of imageQueue. hmmm.. true. And it also fails when I use PIL Image objects instead of arrays. Any idea why compressing the string

Re: Queue limitations?

2006-03-15 Thread mateom
I should be able to add to the queue as fast as I want, right? I tried adding time.sleep(.05) right after put(image) in the producer, and that fixes it. There is only one thread producing and one thread consuming. Thanks for the help. -- http://mail.python.org/mailman/listinfo/python-list

Re: Queue limitations?

2006-03-15 Thread simonwittber
[EMAIL PROTECTED] wrote: the queue holds references to the images, not the images themselves, so the size should be completely irrelevant.I use one instance of imageQueue. hmmm.. true. And it also fails when I use PIL Image objects instead of arrays. Any idea why compressing the string

Re: Queue limitations?

2006-03-15 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I should be able to add to the queue as fast as I want, right? absolutely. but if you slow the producer down, and you're only using one producer and one consumer, the chance increases that the producer and the consumer runs in perfect lockstep. you might as well