emacs-devel
[Top][All Lists]
Advanced

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

Re: Concurrency via isolated process/thread


From: Eli Zaretskii
Subject: Re: Concurrency via isolated process/thread
Date: Tue, 04 Jul 2023 21:24:12 +0300

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: emacs-devel@gnu.org
> Date: Tue, 04 Jul 2023 17:52:23 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> As the first step, I wanted to hear if there is any blocker that
> >> prevents memcpy between processes without going through print/read.
> >
> > I don't think you can design on this base.  Security and all that.
> 
> But why is it a problem?

I'm not an expert, but AFAIK reading from, and writing to, the memory
of another process is something allowed basically only for debuggers.

And how would you know the address in another process anyway, given
today's ASLR techniques?

> Isn't it normal for a C++ thread to get pointer to the parent heap?

That's inside the same process: a huge difference.

> > Also, complex structures include pointers and references, which you
> > cannot safely copy as-is anyway.
> 
> May you please elaborate?

For example, a list whose member is a string includes a pointer to
that string's data.

> >> IMHO, the main problem with threads is that they cannot be interrupted
> >> or fire too frequently.
> >
> > I wish this were the only problem with threads.
> 
> Maybe. But I haven't seen other problems preventing threads from being used.

I have, too many of them.  Some are semi-fixed, but I'm afraid we only
don't hear about them because threads are not used in serious,
production-quality programs.



reply via email to

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