class_docstr: Triggers `policy_saver` save calls in a separate thread asynchronously.
class_docstr_tok: ["Triggers","`","policy_saver","`","save","calls","in","a","separate","thread","asynchronously","."]
docstr: Blocks until there is no saving happening and kills the save_thread.
docstr_tok: ["Blocks","until","there","is","no","saving","happening","and","kills","the","save_thread","."]
code: def close(self):
      """Blocks until there is no saving happening and kills the save_thread."""
      with self._save_condition_variable:
          while self._export_dir:
              logging.info("Waiting for AsyncPolicySaver to finish.")
              self._save_condition_variable.wait()
          self._join_save_thread = True
          self._save_condition_variable.notify()
      self._save_thread.join()
  
file_path: agents/tf_agents/policies/async_policy_saver.py
imports: import threading
  from typing import Text
  from absl import logging
  from tf_agents.policies import policy_saver
label_desc: Use image node_id 8 for calling the AsyncPolicySaver obj's underlying member method code with example usage: obj.close() without return types