@_enable_lock<EOL><INDENT>def unable_thread_pool(self, only_read=False):<DEDENT>
if self.enable_thread_pool and hasattr(self, '<STR_LIT>') and self.thread_pool is not None:<EOL><INDENT>self.thread_pool.shutdown()<EOL>self.thread_pool = None<EOL>self.enable_thread_pool = False<EOL>self.logger.debug('<STR_LIT>')<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>self.logger.warning('<STR_LIT>')<EOL>return False<EOL><DEDENT>
>>> cache = Cache(log_level=logging.WARNING)
>>> cache.unable_thread_pool()
True
>>> cache.unable_thread_pool()
False