Lines Matching refs:item
273 // Appends an item to the end of the linked list, adjusting the current tail's
274 // next pointer and the item's previous pointer where applicable
275 append(item) {
277 this.tail._idleNext = item;
278 item._idlePrev = this.tail;
280 this.head = item;
282 this.tail = item;
285 // Removes an item from the linked list, adjusting the pointers of adjacent
287 remove(item) {
288 if (item._idleNext) {
289 item._idleNext._idlePrev = item._idlePrev;
292 if (item._idlePrev) {
293 item._idlePrev._idleNext = item._idleNext;
296 if (item === this.head)
297 this.head = item._idleNext;
298 if (item === this.tail)
299 this.tail = item._idlePrev;
301 item._idleNext = null;
302 item._idlePrev = null;
320 // The item must have been enroll()'d first.
321 function active(item) {
322 insertGuarded(item, true);
327 function unrefActive(item) {
328 insertGuarded(item, false);
335 function insertGuarded(item, refed, start) {
336 const msecs = item._idleTimeout;
340 insert(item, msecs, start);
342 const isDestroyed = item._destroyed;
343 if (isDestroyed || !item[async_id_symbol]) {
344 item._destroyed = false;
345 initAsyncResource(item, 'Timeout');
351 } else if (refed === !item[kRefed]) {
357 item[kRefed] = refed;
360 function insert(item, msecs, start = getLibuvNow()) {
363 item._idleStart = start;
379 L.append(list, item);