示例#1
0
        private void appendThread()
        {
            Gtk.Image frame = null;


            while (true)
            {
                while (myQueue.Count > 0)
                {
                    lock (myQueue)
                    {
                        if (frame != null)
                        {
                            frame.Dispose();
                            frame = null;
                        }

                        frame = myQueue.Dequeue();
                    }
                }

                if (frame != null)
                {
                    append(frame);
                }

                Thread.Sleep(1000 / 25);
            }
        }