all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 29735@debbugs.gnu.org
Subject: bug#29735: 27.0.50; It must be possible to suspend all timers
Date: Tue, 19 Dec 2017 10:58:40 -0500	[thread overview]
Message-ID: <jwvzi6eag5f.fsf-monnier+bug#29735@gnu.org> (raw)
In-Reply-To: <871sjt3eoe.fsf@gmx.de> (Michael Albinus's message of "Sun, 17 Dec 2017 10:08:01 +0100")

> If during that time a timer starts, which wants to apply a regular file
> operation (let's say `file-attributes'), the corresponding commands are
> sent to the process related to the just started asynchronous process,
> instead to the working horse *tramp/method host*. This fails, of
> course. Therefore, the start of timers between the both code samples
> must be suppressed.

Hmm... but IIUC the same problem shows up if some random process-filter
or process-sentinel uses, say, file-attributes on that same host, right?
So it's not specific to timers?

From the description you give, I understand that:
- start-file-process causes the creation of a new underlying ssh process
  (that makes sense).
- so from then on, we have 2 (or more) ssh processes on the same host
  and the issue is to know which process to use when.
So the problem is to somehow get the "context" of a given call to Tramp,
so as to know which process to use.
Do I understand correctly?

Currently you store which process to use as a "connection-property"
(and it defaults to the "main" process), so basically the "context" is
store in a kind of global variable.

Would it make sense to try and pass that "context" information as
additional arguments instead?  Or via dynamically-coped variable?

E.g. any call to file-attributes (or any other file-name-operation)
should always use the main process, right?  So the mapping from
connection->process could be stored in a dynamically-scoped var, and
tramp-file-name-handler could let-bind this var to nil?


        Stefan





  parent reply	other threads:[~2017-12-19 15:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-16 15:31 bug#29735: 27.0.50; It must be possible to suspend all timers Michael Albinus
2017-12-16 16:22 ` Eli Zaretskii
2017-12-17  9:08   ` Michael Albinus
2017-12-17 15:24     ` Eli Zaretskii
2017-12-17 18:43       ` Michael Albinus
2017-12-19 15:58     ` Stefan Monnier [this message]
2017-12-19 18:47       ` Michael Albinus

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='jwvzi6eag5f.fsf-monnier+bug#29735@gnu.org' \
    --to=monnier@iro.umontreal.ca \
    --cc=29735@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.