fix: reuse shared ThreadPoolExecutor in add/get_all/search to prevent thread leak #4587 uses an instance-level self._executor with max_workers=4 and a close() method — chosen so that if one Memory ...
Rate Limiter Race Condition Under ThreadPoolExecutor Problem Statement PerplexityClient._rate_limit() (lines 150-155) uses a check-then-act pattern on self.last_request_time that is not thread-safe ...