;; When changing this function, consider changing `pop3-accept-process-output'
;; as well.
(defun nnheader-accept-process-output (process)
- (accept-process-output
- process
- (truncate nnheader-read-timeout)
- (truncate (* (- nnheader-read-timeout
- (truncate nnheader-read-timeout))
- 1000))))
+ (accept-process-output process nnheader-read-timeout))
(defun nnheader-update-marks-actions (backend-marks actions)
(dolist (action actions)
tcp-p))
(while (and (zerop (buffer-size))
(> times 0))
- (sit-for (/ step 1000.0))
- (accept-process-output process 0 step)
+ (let ((step-sec (/ step 1000.0)))
+ (sit-for step-sec)
+ (accept-process-output process step-sec))
(setq times (- times step)))
(condition-case nil
(delete-process process)
;; iteration of the loop above.
(when (and (null imap-continuation)
(< imap-reached-tag tag))
- (accept-process-output imap-process 0 0))
+ (accept-process-output imap-process 0))
(when imap-have-messaged
(message ""))
(and (memq (process-status imap-process) '(open run))
(goto-char start)
(while (and (memq (process-status stream) '(open run))
(not (re-search-forward end-of-command nil t)))
- (accept-process-output stream 0 50)
+ (accept-process-output stream 0.05)
(goto-char start))
;; Return the data we got back, or nil if the process died.
(unless (= start (point))
"How long pop3 should wait between checking for the end of output.
Shorter values mean quicker response, but are more CPU intensive.")
(defun pop3-accept-process-output (process)
- (accept-process-output
- process
- (truncate pop3-read-timeout)
- (truncate (* (- pop3-read-timeout
- (truncate pop3-read-timeout))
- 1000))))))
+ (accept-process-output process pop3-read-timeout))))
(defvar pop3-uidl)
;; List of UIDLs of existing messages at present in the server:
starttls-success nil t))
(setq done-bad (re-search-forward
starttls-failure nil t))))))
- (accept-process-output process 1 100)
+ (accept-process-output process 1.1)
(sit-for 0.1))
(setq info (buffer-substring-no-properties old-max (point-max)))
(delete-region old-max (point-max))
(goto-char old-max)
(not (setq done (re-search-forward
starttls-connect nil t)))))
- (accept-process-output process 0 100)
+ (accept-process-output process 0.1)
(sit-for 0.1))
(if done
(with-current-buffer buffer
(server-quote-arg (format "%S" form))
"\n"))
(while (memq (process-status process) '(open run))
- (accept-process-output process 0 10))
+ (accept-process-output process 0.01))
(goto-char (point-min))
;; If the result is nil, there's nothing in the buffer. If the
;; result is non-nil, it's after "-print ".
(defun ispell-accept-output (&optional timeout-secs timeout-msecs)
- "Wait for output from Ispell process, or TIMEOUT-SECS and TIMEOUT-MSECS.
+ "Wait for output from Ispell process, or for TIMEOUT-SECS + TIMEOUT-MSECS.
+\(The TIMEOUT-MSECS argument is obsolete and should be avoided.)
If asynchronous subprocesses are not supported, call function `ispell-filter'
and pass it the output of the last Ispell invocation."
(if ispell-async-processp
- (accept-process-output ispell-process timeout-secs timeout-msecs)
+ (let ((timeout (if timeout-msecs
+ (+ (or timeout-secs 0) (/ timeout-msecs 1000.0))
+ timeout-secs)))
+ (accept-process-output ispell-process timeout))
(if (null ispell-process)
(error "No Ispell process to read output from!")
(let ((buf ispell-output-buffer)