code: private SessionTasksQueue getSessionTasksQueue(IoSession session) {
          SessionTasksQueue queue = (SessionTasksQueue) session.getAttribute(TASKS_QUEUE);
  
          if (queue == null) {
              queue = new SessionTasksQueue();
              SessionTasksQueue oldQueue = 
                  (SessionTasksQueue) session.setAttributeIfAbsent(TASKS_QUEUE, queue);
              
              if (oldQueue != null) {
                  queue = oldQueue;
              }
          }
          
          return queue;
      }
docs: Get the session's tasks queue.