unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: emacs-devel@gnu.org
Cc: "Gerd Möllmann" <gerd@gnu.org>
Subject: Re: master 4ac4cec652f: Prevent freezes on macOS (bug#69561)
Date: Wed, 13 Mar 2024 15:45:08 +0800	[thread overview]
Message-ID: <87wmq6vam3.fsf@yahoo.com> (raw)
In-Reply-To: <20240313061054.71155C1FB4A@vcs2.savannah.gnu.org> (Gerd Moellmann's message of "Wed, 13 Mar 2024 02:10:53 -0400 (EDT)")

Gerd Moellmann <gerd@gnu.org> writes:

>    if (NSApp == nil
>        || ![NSThread isMainThread]
>        || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0))
> -    return thread_select (pselect, nfds, readfds, writefds,
> -			  exceptfds, timeout, sigmask);
> +    thread_select (pselect, nfds, readfds, writefds,
> +		   exceptfds, timeout, sigmask);

Far be it from me to offer advice on code I know very little about, but
on the surface this appears to force non-main threads to enter [NSApp
run] whenever they enter select.  Is this really the desired behavior?

I should think that this function, being provided by the toolkit for the
purpose of running its event loop, must be called by strictly one thread
at a time.



       reply	other threads:[~2024-03-13  7:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <171031025289.32157.8913441761015064536@vcs2.savannah.gnu.org>
     [not found] ` <20240313061054.71155C1FB4A@vcs2.savannah.gnu.org>
2024-03-13  7:45   ` Po Lu [this message]
2024-03-13  8:48     ` master 4ac4cec652f: Prevent freezes on macOS (bug#69561) Gerd Möllmann
2024-03-13 11:07       ` Po Lu
2024-03-13 11:59         ` Gerd Möllmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmq6vam3.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=emacs-devel@gnu.org \
    --cc=gerd@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).