[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User interaction from multiple threads
From: |
Eli Zaretskii |
Subject: |
Re: User interaction from multiple threads |
Date: |
Thu, 30 Aug 2018 16:48:39 +0300 |
> From: hw <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden, address@hidden,
> address@hidden
> Date: Wed, 29 Aug 2018 22:00:52 +0200
>
> >> What information is available when a thread is created?
> >
> > See 'make-thread' for the gory details, but in a nutshell, just the
> > function which the thread will run and the optional name.
>
> Hm. I wish the description would also say how much overhead is involved
> in creating a thread to give us some idea about when to start a thread
> and when not.
There's very little overhead, but if you are interested in the
details, I suggest to read thread.c. It's not a lot of code, and the
ideas are quite simple.
> Knowing only the name of a function and maybe a name for the thread is
> not much. What if the function calls other functions which prompt the
> user? Is it possible to show a backtrace so the user can get some idea
> about what might have caused the prompt to appear?
Someone wrote a mode where you can list threads and display their
backtraces.
> What if the name is designed maliciously?
Why would you run malicious code? This is orthogonal to the issue
being discussed here.
> Also, the user goes like "I want to copy files" rather than "I want to
> call this function". I call functions when I can't remember what
> keystrokes to use but have an idea of how the function may be called.
> How is the function called that deletes files? Does that depend on
> whether the files are remote or local? What do I do when I can't figure
> out what Emacs wants to know when it shows a prompt?
These questions again are orthogonal to the issue at hand, I think.
> If Emacs learns that she usually does not press '!', it could change its
> strategy :) But when it can prepare stuff using another thread, what
> does it matter when it's wrong?
So we will need to have machine learning in Emacs for this to work
satisfactorily?
- Re: User interaction from multiple threads, (continued)
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/27
- Re: User interaction from multiple threads, hw, 2018/08/27
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/28
- Re: User interaction from multiple threads, Phil Sainty, 2018/08/28
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/28
- Re: User interaction from multiple threads, hw, 2018/08/28
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/29
- Re: User interaction from multiple threads, hw, 2018/08/29
- Re: User interaction from multiple threads,
Eli Zaretskii <=
- Re: User interaction from multiple threads, Uday S Reddy, 2018/08/29
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/30
- Re: User interaction from multiple threads, Uday Reddy, 2018/08/30
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/31
- Re: User interaction from multiple threads, Richard Stallman, 2018/08/26
- Re: User interaction from multiple threads, Tom Tromey, 2018/08/22
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/22
- Re: User interaction from multiple threads, Tom Tromey, 2018/08/25
- Re: User interaction from multiple threads, martin rudalics, 2018/08/22
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/22