docstr: Start a sub-thread to handle data writing.
  
  Args:
      record_writer (visualdl.record_writer.RecordWriter):
docstr_tok: ["Start","a","sub-thread","to","handle","data","writing",".","Args",":","record_writer","(","visualdl.record_writer.RecordWriter",")",":"]
code: def __init__(self, record_writer, flush_secs=120, max_queue_size=20):
      """Start a sub-thread to handle data writing.
  
      Args:
          record_writer (visualdl.record_writer.RecordWriter):
      """
  
      self._record_writer = record_writer
      self._closed = False
      self._bytes_queue = queue.Queue(max_queue_size)
      self._worker = _AsyncWriterThread(
          self._bytes_queue, self._record_writer, flush_secs
      )
      self._lock = threading.Lock()
      self._worker.start()
  
imports: from visualdl.io import bfile
  from visualdl.utils.crc32 import masked_crc32c
  from visualdl.proto import record_pb2
  import struct
  import time
  import queue
  import threading
  import os
label_desc: Use image node_id 1 to create a new _AsyncWriter object from inherited base classes: object with example: obj = _AsyncWriter(record_writer, flush_secs, max_queue_size)