code: private void writeObject(ObjectOutputStream out) throws IOException {
          logger.info("Serialization requested, awaiting reference to load.");
          get();
          out.defaultWriteObject();
          logger.info("Serialization finished!");
      }
docs: Method invoked when serialization takes place. Makes sure that we await
  the loading of the result reference before writing any data.
  
  @param out
  @throws IOException