System.Web.HttpRuntime.QueuePendingRequest C# (CSharp) Method

QueuePendingRequest() static private method

static private QueuePendingRequest ( bool started_internally ) : HttpWorkerRequest
started_internally bool
return HttpWorkerRequest
		internal static HttpWorkerRequest QueuePendingRequest (bool started_internally)
		{
			HttpWorkerRequest next = queue_manager.GetNextRequest (null);
			if (next == null)
				return null;

			if (!started_internally) {
				next.StartedInternally = true;
				ThreadPool.QueueUserWorkItem (do_RealProcessRequest, next);
				return null;
			}
			return next;
		}

Usage Example

Example #1
0
        void TimeoutReached(object state)
        {
            HttpRuntime.QueuePendingRequest(false);
            if (Interlocked.CompareExchange(ref timeout_possible, 0, 0) == 0)
            {
                timer.Change(2000, 0);
                return;
            }
            StopTimeoutTimer();

            thread.Abort(new StepTimeout());
        }