private PaintQueue paint; // Paint-only queue
internal ArrayList timer_list;
private Thread thread;
- private bool quit_posted;
private bool dispatch_idle;
private static readonly int InitialXEventSize = 100;
paint = new PaintQueue(InitialPaintSize);
timer_list = new ArrayList ();
this.thread = thread;
- this.quit_posted = false;
this.dispatch_idle = true;
}
public void Enqueue (XEvent xevent)
{
+ if (Thread.CurrentThread != thread) {
+ Console.WriteLine ("Hwnd.Queue.Enqueue called from a different thread without locking.");
+ Console.WriteLine (Environment.StackTrace);
+ }
+
xqueue.Enqueue (xevent);
}
public XEvent Dequeue ()
{
+ if (Thread.CurrentThread != thread) {
+ Console.WriteLine ("Hwnd.Queue.Dequeue called from a different thread without locking.");
+ Console.WriteLine (Environment.StackTrace);
+ }
+
if (xqueue.Count == 0) {
lock (lqueue) {
return lqueue.Dequeue ();
public XEvent Peek()
{
+ if (Thread.CurrentThread != thread) {
+ Console.WriteLine ("Hwnd.Queue.Peek called from a different thread without locking.");
+ Console.WriteLine (Environment.StackTrace);
+ }
+
if (xqueue.Count == 0) {
lock (lqueue) {
return lqueue.Peek ();
}
}
- public bool PostQuitState {
- get {
- return quit_posted;
- }
-
- set {
- quit_posted = value;
- }
- }
-
public class PaintQueue {
private ArrayList hwnds;