From: Michael Albinus <michael.albinus@gmx.de>
To: Ken Raeburn <raeburn@raeburn.org>
Cc: Eli Zaretskii <eliz@gnu.org>, Tom Tromey <tom@tromey.com>,
emacs-devel@gnu.org
Subject: Tramp and concurrency (was: Please test the merge of the concurrency branch)
Date: Sun, 11 Dec 2016 16:14:48 +0100 [thread overview]
Message-ID: <87k2b6xztj.fsf_-_@gmx.de> (raw)
In-Reply-To: <6FD3E405-B333-4A4D-8729-63248C7409CC@raeburn.org> (Ken Raeburn's message of "Sun, 11 Dec 2016 08:54:52 -0500")
Ken Raeburn <raeburn@raeburn.org> writes:
>> If people have proposals what to change in Tramp wrt concurrency, please
>> say so. Of course I know that, for example, file copying shall not block
>> further Emacs use, but I'm still uncertain how to integrate this. As of
>> today, all callers of `copy-file' and friends do expect, that the
>> copying has finished once the function returns.
>
> Given that it’s an optional feature at this point (and not supported
> by every OS), I’d be careful in how you try to make use of it.
>
> In fact, Tramp is one of the areas where you might want to consider
> whether some, ah, defensive changes might be wise first. For example,
> if I have a couple of threads invoking find-file in a package of mine,
> and both invocations have Tramp filenames, and the Tramp code has
> blocking calls (e.g., waiting for subprocess output) that result in
> thread switching, both threads could be trying to mess around with the
> same Tramp data structures and subprocess communications, with messy
> results. Unless we want to tell people “don’t do file operations in
> more than one thread”, or “don’t do Tramp operations in more than one
> thread” (in which case people doing file operations need to check
> whether they’re local files?), maybe Tramp should do some locking
> internally.
Well, Tramp distinguishes between "inline methods" (all communication
goes over the same channel, like for "ssh"), and "external methods",
which invoke an own subprocess for data transfer, like for "scp". A
first candidate for concurrency would be external methods; switching
between processes happens there already.
And I agree that Tramp shall offer this as optional feature. This is
also a must, because Tramp supports also older Emacsen w/o concurrency.
> And what happens if I invoke “tramp-cleanup-all-connections” while a
> file-reading operation is in progress?
Don't know yet. Maybe all such functions in other threads must raise an
"interrupted" error, or so.
> Ken
Best regards, Michael.
next prev parent reply other threads:[~2016-12-11 15:14 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 14:45 Please test the merge of the concurrency branch Eli Zaretskii
2016-12-09 15:30 ` Robert Marshall
2016-12-09 16:26 ` Eli Zaretskii
2016-12-09 16:40 ` Paul Eggert
2016-12-09 16:54 ` Eli Zaretskii
2016-12-09 16:58 ` jpff
2016-12-09 17:06 ` Eli Zaretskii
2016-12-09 16:52 ` Robert Marshall
2016-12-09 23:09 ` Clément Pit--Claudel
2016-12-10 7:14 ` Eli Zaretskii
2016-12-10 15:05 ` Clément Pit--Claudel
2016-12-10 15:50 ` Eli Zaretskii
2016-12-09 22:33 ` David Caldwell
2016-12-10 6:50 ` Eli Zaretskii
2016-12-10 13:14 ` Alan Third
2016-12-10 14:06 ` Eli Zaretskii
2016-12-09 22:58 ` Karl Fogel
2016-12-10 7:09 ` Eli Zaretskii
2016-12-12 3:05 ` Karl Fogel
2016-12-09 23:19 ` Andrés Ramírez
2016-12-10 7:14 ` Eli Zaretskii
2016-12-10 8:09 ` Andreas Politz
2016-12-10 9:07 ` Eli Zaretskii
2016-12-10 16:05 ` Joseph Mingrone
2016-12-10 17:50 ` Eli Zaretskii
2016-12-10 16:33 ` Achim Gratz
2016-12-10 16:56 ` Filipe Silva
2016-12-10 17:56 ` Eli Zaretskii
2016-12-10 17:52 ` Eli Zaretskii
2016-12-10 17:36 ` Concurrency has landed (was: Please test the merge of the concurrency branch) Eli Zaretskii
2016-12-10 18:24 ` Concurrency has landed Eli Zaretskii
2016-12-10 18:26 ` raman
2016-12-10 18:36 ` Eli Zaretskii
2016-12-10 19:22 ` Paul Eggert
2016-12-22 4:52 ` Daniel Colascione
2016-12-22 19:23 ` Paul Eggert
2016-12-22 19:32 ` Daniel Colascione
2016-12-22 19:56 ` Paul Eggert
2016-12-24 0:52 ` Stefan Monnier
2016-12-24 1:51 ` Paul Eggert
2016-12-24 4:49 ` Stefan Monnier
2016-12-24 5:04 ` Paul Eggert
2016-12-22 19:57 ` Davis Herring
2016-12-13 12:28 ` Phillip Lord
2016-12-13 16:09 ` Eli Zaretskii
2016-12-11 2:51 ` Please test the merge of the concurrency branch Ken Raeburn
2016-12-11 3:33 ` Eli Zaretskii
2016-12-11 19:40 ` Peter Wang
2016-12-11 20:31 ` Eli Zaretskii
2016-12-11 9:11 ` Michael Albinus
2016-12-11 13:54 ` Ken Raeburn
2016-12-11 15:14 ` Michael Albinus [this message]
2016-12-11 15:45 ` Eli Zaretskii
2016-12-11 18:30 ` Daimrod
2016-12-11 18:42 ` Eli Zaretskii
2016-12-11 19:02 ` Daimrod
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k2b6xztj.fsf_-_@gmx.de \
--to=michael.albinus@gmx.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=raeburn@raeburn.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).