Lines Matching refs:list

13 // linked list implementation, since timers depend on it extensively. It can be
57 // is possible in the JavaScript layer. Any one list of timers is able to be
61 // Removal from an object-property linked list is also virtually constant-time
64 // always be at the beginning of the list for reasons stated above. Any timers
71 // Timeout lists and the object map lookup of a specific list by the duration of
72 // timers within (or creation of a new list). However, these operations combined
149 // individual IDs to determine which list was created first.
156 // - value = linked list
201 // Make sure the linked list only shows the minimal necessary information.
246 this._idleNext = this; // Create the list with the linkedlist properties to
254 // Make sure the linked list only shows the minimal necessary information.
266 // A linked list for storing `setImmediate()` requests
273 // Appends an item to the end of the linked list, adjusting the current tail's
285 // Removes an item from the linked list, adjusting the pointers of adjacent
286 // items and the linked list's head or tail pointers as necessary
306 // Create a single linked list instance only once at startup
333 // Appends a timer onto the end of an existing timers list, or creates a new
334 // list if one does not already exist for the specified timeout duration.
365 // Use an existing list if there is one, otherwise we need to make a new one.
366 let list = timerListMap[msecs];
367 if (list === undefined) {
368 debug('no %d list was found in insert, creating a new one', msecs);
370 timerListMap[msecs] = list = new TimersList(expiry, msecs);
371 timerListQueue.insert(list);
379 L.append(list, item);
436 // Clear the linked list early in case new `setImmediate()`
501 let list;
503 while ((list = timerListQueue.peek()) != null) {
504 if (list.expiry > now) {
505 nextExpiry = list.expiry;
512 listOnTimeout(list, now);
517 function listOnTimeout(list, now) {
518 const msecs = list.msecs;
524 while ((timer = L.peek(list)) != null) {
528 // This happens if there are more timers scheduled for later in the list.
530 list.expiry = MathMax(timer._idleStart + msecs, now + 1);
531 list.id = timerListId++;
533 debug('%d list wait because diff is %d', msecs, diff);
590 // If `L.peek(list)` returned nothing, the list was either empty or we have
592 // As such, we can remove the list from the object map and
594 debug('%d list empty', msecs);
596 // The current list may have been removed and recreated since the reference
597 // to `list` was created. Make sure they're the same instance of the list
599 if (list === timerListMap[msecs]) {