1. while (log == null) {
    2. Thread.yield();
    3. log = logs[idx];
    4. }