class_docstr: FutureTaskCaller is used to create a class via a functions async, in another thread.
  
  For example:
  
  .. code-block:: py
  
      future = FutureTaskCaller().call(func=max, func_cb=None, override_cls=None, 1, 2)
      print('Running other code')
      print(future.result())  # will print '2'
class_docstr_tok: ["FutureTaskCaller","is","used","to","create","a","class","via","a","functions","async",",","in","another","thread",".","For","example",":","..","code-block",":",":","py","future","=","FutureTaskCaller","(",")",".call","(","func=max",",","func_cb=None",",","override_cls=None",",","1",",","2",")","print","(","'Running","other","code","'",")","print","(","future.result","(",")",")","#","will","print","'","2","'"]
docstr: Wait and get the result of the function called with self.call()
  
  :param timeout: The maximum number of seconds to wait for the result. If None,
      there is no limit for the wait time.
  
  :return: The result of the called function
docstr_tok: ["Wait","and","get","the","result","of","the","function","called","with","self.call","(",")",":","param","timeout",":","The","maximum","number","of","seconds","to","wait","for","the","result",".","If","None",",","there","is","no","limit","for","the","wait","time",".",":","return",":","The","result","of","the","called","function"]
code: def __result__(self, timeout=None):
      # type: (Optional[float]) -> Any
      """
      Wait and get the result of the function called with self.call()
  
      :param timeout: The maximum number of seconds to wait for the result. If None,
          there is no limit for the wait time.
  
      :return: The result of the called function
      """
      if self.__executor:
          # since the test is not atomic, we assume that if we failed joining
          # it is because someone else joined before us
          # noinspection PyBroadException
          try:
              self.__executor.join(timeout=timeout)
          except RuntimeError:
              # this is probably calling ourselves from the same thread
              raise
          except Exception:
              # wait until that someone else updated the __object
              while self.__object is None:
                  sleep(1)
          self.__executor = None
      return self.__object
  
imports: import os
  from copy import deepcopy
  from time import sleep
  from concurrent.futures import ThreadPoolExecutor
  from typing import Any, Callable, Optional, Union, Generator, List, Type
  from zipfile import ZipFile, ZIP_DEFLATED
  from six.moves.queue import PriorityQueue, Queue, Empty
  from pathlib2 import Path
  from tempfile import mkstemp
  from collections import deque
  from threading import Thread
  from ..debugging.log import LoggerRoot
  from ..storage.util import format_size
label_desc: Use image node_id 6 for calling the FutureTaskCaller obj's underlying member method code with example usage: obj.__result__(timeout) and returns: self