class_docstr: Wrapper that runs the `get_completions` generator in a thread.
  
  (Use this to prevent the user interface from becoming unresponsive if the
  generation of completions takes too much time.)
  
  The completions will be displayed as soon as they are produced. The user
  can already select a completion, even if not all completions are displayed.
class_docstr_tok: ["Wrapper","that","runs","the","`","get_completions","`","generator","in","a","thread",".","(","Use","this","to","prevent","the","user","interface","from","becoming","unresponsive","if","the","generation","of","completions","takes","too","much","time",".",")","The","completions","will","be","displayed","as","soon","as","they","are","produced",".","The","user","can","already","select","a","completion",",","even","if","not","all","completions","are","displayed","."]
code: def __init__(self, completer: Completer) -> None:
      self.completer = completer
  
imports: from __future__ import annotations
  from abc import ABCMeta, abstractmethod
  from typing import AsyncGenerator, Callable, Iterable, Sequence
  from prompt_toolkit.document import Document
  from prompt_toolkit.eventloop import aclosing, generator_to_async_generator
  from prompt_toolkit.filters import FilterOrBool, to_filter
  from prompt_toolkit.formatted_text import AnyFormattedText, StyleAndTextTuples
label_desc: Use image node_id 1 to create a new ThreadedCompleter object from inherited base classes: Completer with example: obj = ThreadedCompleter(completer)