Function: pfuture-result
pfuture-result is a byte-compiled function defined in pfuture.el.
Signature
(pfuture-result PROCESS)
Documentation
Return the output of a pfuture PROCESS.
If the PROCESS is still alive only the output collected so far will be returned.
To get the full output use either pfuture-await or pfuture-await-to-finish.
Source Code
;; Defined in ~/.emacs.d/elpa/pfuture-20220913.1401/pfuture.el
(define-inline pfuture-result (process)
"Return the output of a pfuture PROCESS.
If the PROCESS is still alive only the output collected so far will be returned.
To get the full output use either `pfuture-await' or `pfuture-await-to-finish'."
(declare (side-effect-free t))
(inline-letevals (process)
(inline-quote
(let* ((result (process-get ,process 'result)))
(cond
(result result)
((process-live-p ,process)
(let ((buffer (process-get ,process 'buffer)))
(with-current-buffer buffer (buffer-string))))
(t
(let* ((buffer (process-get ,process 'buffer))
(output (with-current-buffer buffer
(buffer-string))))
(process-put ,process 'result output)
(kill-buffer buffer)
output)))))))