code: def result(self, timeout=None):
          
          if self._done_event.wait(timeout):
              return self._done_event.data
          else:
              raise OSError("Timeout raised")
docs: Waits up to timeout for the result the threaded job.
          Returns immediately the result if the job has already been done.
  
          :param timeout: The maximum time to wait for a result (in seconds)
          :raise OSError: The timeout raised before the job finished
          :raise Exception: The exception encountered during the call, if any