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: Sat, 01 Sep 2018 21:55:14 +0300

> From: hw <address@hidden>
> Cc: address@hidden,  address@hidden,  address@hidden,  address@hidden,  
> address@hidden
> Date: Sat, 01 Sep 2018 19:32:07 +0200
> 
> > 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.
> 
> I wish I had at least 50 lifetimes so I could do more of what I would
> like to do.

Same here.

> Would you say that when a user is writing a function that does some
> string replacements within texts that are usually between 16 and
> 64kB in size should use multiple threads to replace different
> strings or not?

Could be, if the code is written to yield from time to time.

> I would expect it to be slower because of the overhead unless multiple
> threads could run at the same time.  Since they can't, what would be an
> advantage of using multiple threads?

It is advantageous if some of the threads call yielding APIs, since
then other threads could run while they are waiting.



reply via email to

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