class_docstr: Writes `Event` protocol buffers to an event file.
  
  The `EventFileWriter` class creates an event file in the specified directory,
  and asynchronously writes Event protocol buffers to the file. The Event file
  is encoded using the tfrecord format, which is similar to RecordIO.
  
  This class is not thread-safe.
class_docstr_tok: ["Writes","`","Event","`","protocol","buffers","to","an","event","file",".","The","`","EventFileWriter","`","class","creates","an","event","file","in","the","specified","directory",",","and","asynchronously","writes","Event","protocol","buffers","to","the","file",".","The","Event","file","is","encoded","using","the","tfrecord","format",",","which","is","similar","to","RecordIO",".","This","class","is","not","thread-safe","."]
docstr: Flushes the event file to disk.
  
  Call this method to make sure that all pending events have been written to
  disk.
docstr_tok: ["Flushes","the","event","file","to","disk",".","Call","this","method","to","make","sure","that","all","pending","events","have","been","written","to","disk","."]
code: def flush(self):
      """Flushes the event file to disk.
  
      Call this method to make sure that all pending events have been written to
      disk.
      """
      if not self._closed:
          # Request a flush operation by enqueuing a sentinel and then waiting for
          # the writer thread to mark the flush as complete.
          self._flush_complete.clear()
          self._try_put(self._flush_sentinel)
          self._flush_complete.wait()
          if self._worker.failure_exc_info:
              self._internal_close()
              _, exception, _ = self._worker.failure_exc_info
              raise exception
  
imports: import collections
  import os.path
  import sys
  import threading
  import time
  from tensorflow.python.client import _pywrap_events_writer
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import compat
label_desc: Use image node_id 7 for calling the EventFileWriter obj's underlying member method code with example usage: obj.flush() without return types