code: function() {
      firstTaskTimeout = clearTimeout(firstTaskTimeout);
      const task = taskQueue.shift();
  
      if (task) {
        const conn = idleConnections.shift();
        if (conn) {
          activeConnections[conn.threadId] = conn;
          resetTimeoutToNextTask();
          processTask(conn, task.sql, task.values, task.isBatch)
            .then(task.resolve)
            .catch(task.reject);
        } else {
          taskQueue.unshift(task);
        }
      }
    }
docs: Launch next waiting task request if available connections.