Subject: Re: bug#38748: 28.0.50; crash on MacOS 10.15.2

From: Alan Third <[email-masked]>
Date: Sat, 11 Jan 2020 13:59:20 +0000

On Fri, Jan 10, 2020 at 09:22:30AM +0000, Pip Cet wrote:
> On Fri, Jan 10, 2020 at 8:27 AM Eli Zaretskii <[email-masked]> wrote:
> > What do you mean by "secondary thread"?
> 
> It's my impression that macOS forces us to run in several threads,
> even though we don't really want to do so. For example, changeFont in
> nsterm.m appears not to assume it's run on the main thread, but calls
> build_string, which sounds dangerous to me.

What makes you think it’s assuming it may not be run on the main
thread?

macOS does set up several threads, but it doesn’t force any of your
code to run in arbitrary threads.

One of the big TODOs in the NS port is making code that may be called
from lisp safe to run in any thread because at the moment it all
assumes it’s running in a single thread, but lisp can call from any
lisp thread (and then Emacs crashes).

-- 
Alan Third