]> git.eshelyaron.com Git - emacs.git/commit
Introducing thread-safe Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 23 Jul 2018 15:34:47 +0000 (17:34 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 23 Jul 2018 15:34:47 +0000 (17:34 +0200)
commitcf4e1b18aa88f7995e637260ccf79ba1f0dbb0c1
treee5f842f85cf25c103325b124694245cc07030e73
parent57c4bc146b7e17b6f662604047cb5d10982f962c
Introducing thread-safe Tramp

* doc/misc/tramp.texi (History): Tramp is thread-safe now.

* etc/NEWS: Mention asynchronous visiting of files, and Tramp being
thread-safe.

* lisp/files.el (find-file-read-args): Add optional arument WILDCARDS.
(find-file-with-threads): New defmacro.
(find-file, find-file-other-window, find-file-other-frame)
(find-file-existing, find-alternate-file-other-window)
(find-alternate-file, find-file-literally): New optional argument
THREADS.  Adapt docstring if necessary.  Wrap the body by
`find-file-with-threads'.
(find-file--read-only, find-file-read-only)
(find-file-read-only-other-window)
(find-file-read-only-other-frame): New optional argument THREADS.
(find-file-noselect): New optional argument THREADS.  Adapt
docstring.  Create new threads for all files detected through WILDCARDS.

* lisp/net/tramp-compat.el (tramp-compat-main-thread): New defconst.
(tramp-compat-current-thread, tramp-compat-thread-yield)
(tramp-compat-signal): New defsubst.
(tramp-compat-with-mutex): New defmacro.

* lisp/net/tramp.el (tramp-debug-outline-regexp): Add thread regexp.
(tramp-debug-font-lock-keywords): New defconst.
(tramp-debug-outline-level): Adapt to changed
`tramp-debug-outline-regexp'.
(tramp-get-debug-buffer): Use `tramp-debug-font-lock-keywords'.
(tramp-debug-message): Insert also thread name.
(tramp-error): Propagate error to main thread.
(tramp-condition-case-unless-debug): Add declarations.
(tramp-mutex): New defvar.
(tramp-get-mutex): New defun.
(tramp-file-name-handler): Adapt to threads.  Lock Tramp mutex.
Set process thread.  Propagate signals to main thread.

* lisp/vc/vc-hooks.el (vc-mutex): New autoloaded variable.
(vc-refresh-state): Let it run in own thread.  Lock it with `vc-mutex'.

* test/lisp/net/tramp-archive-tests.el (tramp-archive-test44-auto-load)
(tramp-archive-test44-delay-load): Rename.

* test/lisp/net/tramp-tests.el (tramp-test43-threads): New test.
(tramp-test44-auto-load, tramp-test44-delay-load)
(tramp-test44-recursive-load, tramp-test44-remote-load-path)
(tramp-test45-unload): Rename.
doc/misc/tramp.texi
etc/NEWS
lisp/files.el
lisp/net/tramp-compat.el
lisp/net/tramp.el
lisp/vc/vc-hooks.el
test/lisp/net/tramp-archive-tests.el
test/lisp/net/tramp-tests.el