Function: pfuture-await-to-finish

pfuture-await-to-finish is a byte-compiled function defined in pfuture.el.

Signature

(pfuture-await-to-finish PROCESS)

Documentation

Keep reading the output of PROCESS until it is done.

Same as pfuture-await, but will keep reading (and blocking) so long as the process is *alive*.

If the process never quits this method will block forever. Use with caution!

Source Code

;; Defined in ~/.emacs.d/elpa/pfuture-20220913.1401/pfuture.el
(defun pfuture-await-to-finish (process)
  "Keep reading the output of PROCESS until it is done.
Same as `pfuture-await', but will keep reading (and blocking) so long as the
process is *alive*.

If the process never quits this method will block forever.  Use with caution!"
  ;; If the sentinel hasn't run, disable it. We are going to delete
  ;; the stderr process here.
  (set-process-sentinel process nil)
  (let (inhibit-quit)
    (while (accept-process-output process)))
  (let* ((plist (process-plist process))
         (stderr-process (plist-get plist 'stderr-process)))
    (when stderr-process
      (pfuture--delete-process stderr-process))
    (pfuture-result process)))