コード例 #1
0
 def queue_completion(self,
                      request_id,
                      completion_type,
                      completion_data,
                      query=None):
     with self.lock:
         ccr = Request(request_id, completion_type, completion_data, query)
         self.latest_completion_request_id = ccr.id
     self.main_queue.put((COMPLETION_REQUEST, ccr))
コード例 #2
0
 def queue_completion(self,
                      request_id,
                      completion_type,
                      completion_data,
                      query=None):
     with self.lock:
         self.current_completion_request = Request(request_id,
                                                   completion_type,
                                                   completion_data, query)
         self.latest_completion_request_id = self.current_completion_request.id
     self.main_queue.put((COMPLETION_REQUEST, None))
コード例 #3
0
 def clear_caches(self, cache_type=None):
     self.main_queue.put(
         (CLEAR_REQUEST, Request(None, 'clear_caches', cache_type, None)))