Exemplo n.º 1
0
        internal void Add(HttpContext context)
        {
            if (context.TimeoutLink != null)
            {
                ((RequestTimeoutEntry)context.TimeoutLink).IncrementCount();
                return;
            }

            // create new entry

            RequestTimeoutEntry entry = new RequestTimeoutEntry(context);

            // add it to the list

            int i = _currentList++;

            if (i >= _lists.Length)
            {
                i            = 0;
                _currentList = 0;
            }

            entry.AddToList(_lists[i]);
            Interlocked.Increment(ref _requestCount);

            // update HttpContext
            context.TimeoutLink = entry;
        }
Exemplo n.º 2
0
 internal void Add(TdsContext context)
 {
     if (context.TimeoutLink != null)
         ((RequestTimeoutEntry)context.TimeoutLink).IncrementCount();
     else
     {
         var entry = new RequestTimeoutEntry(context);
         var index = _currentList++;
         if (index >= _lists.Length)
         {
             index = 0;
             _currentList = 0;
         }
         entry.AddToList(_lists[index]);
         Interlocked.Increment(ref _requestCount);
         context.TimeoutLink = entry;
     }
 }
 internal void Add(HttpContext context)
 {
     if (context.TimeoutLink != null)
     {
         ((RequestTimeoutEntry) context.TimeoutLink).IncrementCount();
     }
     else
     {
         RequestTimeoutEntry entry = new RequestTimeoutEntry(context);
         int index = this._currentList++;
         if (index >= this._lists.Length)
         {
             index = 0;
             this._currentList = 0;
         }
         entry.AddToList(this._lists[index]);
         Interlocked.Increment(ref this._requestCount);
         context.TimeoutLink = entry;
     }
 }
Exemplo n.º 4
0
 internal void Add(HttpListenerWorkerRequest wr)
 {
     if (wr.TimeoutLink != null)
     {
         ((RequestTimeoutEntry)wr.TimeoutLink).IncrementCount();
     }
     else
     {
         var entry = new RequestTimeoutEntry(wr);
         int index = _currentList++;
         if (index >= _lists.Length)
         {
             index        = 0;
             _currentList = 0;
         }
         entry.AddToList(_lists[index]);
         Interlocked.Increment(ref _requestCount);
         wr.TimeoutLink = entry;
     }
 }
 internal void Add(HttpContext context)
 {
     if (context.TimeoutLink != null)
     {
         ((RequestTimeoutEntry)context.TimeoutLink).IncrementCount();
     }
     else
     {
         RequestTimeoutEntry entry = new RequestTimeoutEntry(context);
         int index = this._currentList++;
         if (index >= this._lists.Length)
         {
             index             = 0;
             this._currentList = 0;
         }
         entry.AddToList(this._lists[index]);
         Interlocked.Increment(ref this._requestCount);
         context.TimeoutLink = entry;
     }
 }
        internal void Add(HttpContext context) {
            if (context.TimeoutLink != null) {
                ((RequestTimeoutEntry)context.TimeoutLink).IncrementCount();
                return;
            }
           
            // create new entry

            RequestTimeoutEntry entry = new RequestTimeoutEntry(context);

            // add it to the list

            int i = _currentList++;
            if (i >= _lists.Length) {
                i = 0;
                _currentList = 0;
            }

            entry.AddToList(_lists[i]);
            Interlocked.Increment(ref _requestCount);

            // update HttpContext
            context.TimeoutLink = entry;
        }