def add_background_job(self, function, *args, **kws):
    'Add a function with parameters *args and **kws to a queue to be completed\n        asynchronously with the rest of the timepoint acquisition. This will be\n        run in a background thread, so make sure that the function acts in a\n        threadsafe manner. (NB: self.logger *is* thread-safe.)\n\n        All queued functions will be waited for completion before the timepoint\n        ends. Any exceptions will be propagated to the foreground after all\n        functions queued either finish or raise an exception.\n        '
    if (self._job_thread is None):
        self._job_thread = futures.ThreadPoolExecutor(max_workers=1)
    self._job_futures.append(self._job_thread.submit(function, *args, **kws))
Add a function with parameters *args and **kws to a queue to be completed
asynchronously with the rest of the timepoint acquisition. This will be
run in a background thread, so make sure that the function acts in a
threadsafe manner. (NB: self.logger *is* thread-safe.)

All queued functions will be waited for completion before the timepoint
ends. Any exceptions will be propagated to the foreground after all
functions queued either finish or raise an exception.
def add_background_job(self, function, *args, **kws):
    'Add a function with parameters *args and **kws to a queue to be completed\n        asynchronously with the rest of the timepoint acquisition. This will be\n        run in a background thread, so make sure that the function acts in a\n        threadsafe manner. (NB: self.logger *is* thread-safe.)\n\n        All queued functions will be waited for completion before the timepoint\n        ends. Any exceptions will be propagated to the foreground after all\n        functions queued either finish or raise an exception.\n        '
    if (self._job_thread is None):
        self._job_thread = futures.ThreadPoolExecutor(max_workers=1)
    self._job_futures.append(self._job_thread.submit(function, *args, **kws))