allThreadsQueue.add(thread);
allThreadsQueue.add(thread, "Vm");
    final void registerThread(VmThread thread) {        if (Vm.isWritingImage()) {            allThreadsQueue.add(thread);        } else {            allThreadsLock.lock();            try {                allThreadsQueue.add(thread);            } finally {                allThreadsLock.unlock();            }        }    }