(with-mutex vc-mutex
(thread-yield)
(dolist (thread threads result)
- (setq result (cons (thread-join thread) result)))))
+ (setq result (with-demoted-errors
+ (cons (thread-join thread) result))))))
(mapcar #'find-file-noselect files))))
"Yield the CPU to another thread."
(tramp-compat-funcall 'thread-yield))
-(defsubst tramp-compat-signal (error-symbol data)
- "Signal an error to the main thread."
- (when tramp-compat-main-thread
- (tramp-compat-funcall
- 'thread-signal tramp-compat-main-thread error-symbol data))
- (signal error-symbol data))
-
;; Mutexes have entered Emacs 26.1. Once we use only Emacs 26+, we
;; must check (mutexp mutex), because the other functions might still
;; not exist when Emacs is configured --without-threads.
"Emit an error.
VEC-OR-PROC identifies the connection to use, SIGNAL is the
signal identifier to be raised, remaining arguments passed to
-`tramp-message'. Finally, signal SIGNAL is raised to the main thread."
+`tramp-message'. Finally, signal SIGNAL is raised."
(let (tramp-message-show-message)
(tramp-backtrace vec-or-proc)
(unless arguments
(list signal
(get signal 'error-message)
(apply #'format-message fmt-string arguments)))))
- (tramp-compat-signal
- signal (list (apply #'format-message fmt-string arguments)))))
+ (signal signal (list (apply #'format-message fmt-string arguments)))))
(defsubst tramp-error-with-buffer
(buf vec-or-proc signal fmt-string &rest arguments)
(tramp-message
v 1 "Interrupt received in operation %s"
(cons operation args)))
- ;; Propagate the quit signal.
- (tramp-compat-signal (car err) (cdr err)))
+ ;; Propagate the signal.
+ (signal (car err) (cdr err)))
;; When we are in completion mode, some failed
;; operations shall return at least a default
'(expand-file-name file-name-as-directory)))
filename)
;; Propagate the error.
- (t (tramp-compat-signal (car err) (cdr err))))))
+ (t (signal (car err) (cdr err))))))
;; Nothing to do for us. However, since we are in
;; `tramp-mode', we must suppress the volume letter