emacs-devel
[Top][All Lists]
Advanced

[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?



reply via email to

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