[Gtk-sharp-list] ThreadNotify (A bug in Queue.Dequeue method)

Vladimir Vukicevic vladimir@pobox.com
11 Oct 2002 22:15:02 -0700


On Fri, 2002-10-11 at 19:44, Pablo Baena wrote:
> The last problem I showed here is not ThreadNotify's fault. Seems to
> be a bug in Queue.Dequeue. 
> If you look at the output of the test, you will notice it isn't
> accurate to the data in the queue when you use Dequeue, but the
> commented part with foreach works fine. 

This test seems to work fine for me... I have it putting in the lines of
data and then dequeueing the same lines in the same order.  The lock
statements are necessary when you use the queue between threads; you
want to lock (queue) { operations_on_queue_here; }, since the queue
itself doesn't do any locking.  What output are you seeing that's
broken?  I'd also suggest not using ls for a test case, because of the
possibility of ls sending bizzarely formatted output that could be
confusing the reader (the chances of this are almost zero, but still..)

	- Vlad

-- 
Vladimir Vukicevic <vladimir@pobox.com>