GNU bug report logs - #78946
30.1; accept-process-output not allowed in threads on macOS

Previous Next

Package: emacs;

Reported by: John Wiegley <jwiegley <at> gmail.com>

Date: Wed, 2 Jul 2025 19:21:02 UTC

Severity: normal

Found in version 30.1

Full log


View this message in rfc822 format

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: John Wiegley <jwiegley <at> gmail.com>, 78946 <at> debbugs.gnu.org, contact <at> karthinks.com
Subject: bug#78946: 30.1; accept-process-output not allowed in threads on macOS
Date: Thu, 03 Jul 2025 14:39:04 +0200
>>>>> On Thu, 03 Jul 2025 13:12:32 +0300, Eli Zaretskii <eliz <at> gnu.org> said:

    >> #+begin_example
    >> 2025-07-02 12:10:23.857272-0700 Emacs[34130:54192679] [General]
    >> nextEventMatchingMask should only be called from the Main Thread!

    Eli> This message seems to be relevant, no?  Can some macOS expert explain
    Eli> what it means, and how is that related to ns_select?

On macOS only the main thread is allowed to process events, which is
why ns_select normally does a whole dance with a separate thread which
posts events for the main thread to react to. Itʼs fragile, and should
probably be re-written, but nobody has stepped up to do it.

John, does it help if you stick something like

  if ([[NSThread currentThread] isMainThread])
    {
    }

around the

    [NSApp run];

in `ns_select_1'?

Robert
-- 




This bug report was last modified 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.