void perform() {
      if (!done) {
        // if this thread is allocating a new segment, then wait on allocating it
        // if this thread is just using one, then wait for it to become available
        flush.forEach(Segment::flushToDisk);
        allocate.forEach(Segment::allocate);
        done = true;
      }
    }
Instructions that tell a thread which segments must be flushed, and which must be allocated before any threads can
start writing to the result segment.
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/ArrayLongLongMapMmap.java