emacs-devel
[Top][All Lists]
Advanced

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

Re: Can we go GTK-only?


From: Eli Zaretskii
Subject: Re: Can we go GTK-only?
Date: Mon, 31 Oct 2016 22:53:11 +0200

> From: Ken Raeburn <address@hidden>
> Date: Mon, 31 Oct 2016 14:22:50 -0400
> Cc: Stefan Monnier <address@hidden>,
>  address@hidden
> 
> 
> On Oct 31, 2016, at 11:54, Eli Zaretskii <address@hidden> wrote:
> 
> >   One problem with
> > having too much code in separate threads is that only the main thread
> > can call malloc/free, i.e. you cannot create/destroy objects in other
> > threads.
> 
> Wow.  Is that a Windows limitation?  It’s certainly not true under POSIX 
> threads.

No, it's a general limitation: malloc is non-reentrant.

> Creating Lisp objects, that’d be another matter, unless locking is introduced 
> to the allocator.

If you cannot allocate Lisp objects, the scope of what you can do in
the non-main threads is greatly diminished.  E.g., no computation
intensive jobs that operate on buffer text can be off-loaded to other
threads.



reply via email to

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