emacs-devel
[Top][All Lists]
Advanced

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

Re: Should this package be included into the NS port?


From: Eli Zaretskii
Subject: Re: Should this package be included into the NS port?
Date: Thu, 24 May 2018 19:37:41 +0300

> Date: Wed, 23 May 2018 22:21:29 +0100
> From: Alan Third <address@hidden>
> Cc: Nick Helm <address@hidden>, address@hidden,
>       address@hidden, address@hidden
> 
> The main problem I have is things coming in the opposite direction. I
> don’t know if W32 is the same, but we can only run GUI related code in
> the main thread.

What do you mean by "GUI code" here?

> If we separate the Lisp thread and the NS run loop thread, then code
> called from Lisp can’t directly interact with the NS GUI code, it
> has to be dispatched to the NS run loop thread.

The w32 build has a similar problem, and it solves it by setting up
message queue between the main and the input threads.  Messages are
sent between the two threads when needed, and the Windows native
messages are used in the opposite direction.  So when one thread needs
something done by the other thread, it sends the appropriate message,
waits for a response, then continues (and sometimes it doesn't have to
wait for any response, it depends on the case).

Can NS use some similar machinery?



reply via email to

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