Ejemplo n.º 1
0
		public void Enqueue( Event e )
		{
			lock( this )
			{
				this.queue.Enqueue( e );
				Monitor.Pulse( this );
			}
		}
Ejemplo n.º 2
0
		public void Enqueue( Event e )
		{
			lock( this.syncRoot )
			{
				this.queue.Enqueue( e );
				Monitor.Pulse( this.syncRoot );
			}

            if ( this.synchronousEventSent != null && e.IsSynchronous )
            {
                this.synchronousEventSent.WaitOne();
            }
            else
            {
                Thread.Sleep( 0 ); // give EventPump thread a chance to process the event
            }
		}