Example #1
0
        /// <summary>
        /// Queue a work item to be called by a background thread
        /// </summary>
        /// <param name="waitCallback">WaitCallback delegate to be invoked</param>
        /// <param name="parameters">Array of objects to pass as parameters</param>
        internal static void QueueUserWorkItem(RtpEvents.RaiseEvent del, object[] parameters)
        {
            syncWorkItems.Enqueue(new WorkItem(del, parameters));

            if (peakQueueLength < syncWorkItems.Count)
            {
                peakQueueLength = syncWorkItems.Count;
            }

            newWorkItem.Set();
        }
Example #2
0
 public WorkItem(RtpEvents.RaiseEvent method, object[] parameters)
 {
     this.method     = method;
     this.parameters = parameters;
 }
Example #3
0
 public WorkItem(RtpEvents.RaiseEvent method, object[] parameters)
 {
     this.method = method;
     this.parameters = parameters;
 }