Need to use a semaphore to protect the menu loading process.