emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master d805757: Fix a subtle problem in Tramp with tim


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master d805757: Fix a subtle problem in Tramp with timers
Date: Wed, 01 Feb 2017 09:35:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> +  ;; FIXME: There are problems, when an asynchronous process runs in
> +  ;; parallel, and also timers are active.  See
> +  ;; <http://lists.gnu.org/archive/html/tramp-devel/2017-01/msg00010.html>.

Hmm... this thread doesn't seem to have an explanation of the problem.
It basically has a recipe to reproduce a problem, but that's about it.
Do we know what is the underlying problem?  It sounds nasty and it might
be worth trying to (additionally) fix it "right" directly in Emacs.

> +  (when (and timer-event-last
> +          (string-prefix-p "*tramp/" (process-name proc))

Why not do something like (process-get proc 'tramp-<something>) instead of
testing its name?

> +          (let (result)
> +            (maphash
> +             (lambda (key _value)
> +               (and (processp key)
> +                    (not (string-prefix-p "*tramp/" (process-name key)))
> +                    (tramp-compat-process-live-p key)
> +                    (setq result t)))
> +             tramp-cache-data)
> +            result))
> +    (sit-for 0.01 'nodisp))

The thread linked does mention that (sit-for 0.01 'nodisp) circumvents
the problem, but I see no explanation for the condition you use around
it (all that tramp-cache-data and timer-event-last business).

>        ;; Under Windows XP, accept-process-output doesn't return
> -      ;; sometimes.  So we add an additional timeout.

I see this is not new, but here as well, it sounds like something that
we should fix in Emacs.  Did you report the problem?  Does it have a bug#?
Is it fixed in recent Emacsen?  If so, which versions are affected?


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]