}
// Check that it's a IoEvent task
checkTaskType(task);
IoEvent event = (IoEvent) task;
// Get the associated session
IoSession session = event.getSession();
// Get the session's queue of events
SessionTasksQueue sessionTasksQueue = getSessionTasksQueue(session);
Queue<Runnable> tasksQueue = sessionTasksQueue.tasksQueue;