Subject: bug#65193: 29.1.50; SET_FRAME_ICONIFIED can cause Lisp evaluation inside read_socket_hook.

From: YAMAMOTO Mitsuharu <[email-masked]>
Date: Fri, 11 Aug 2023 01:33:41 +0900

Another problem specific to the NS port w.r.t. the call to
gui_consider_frame_title from SET_FRAME_ICONIFIED is that it can
also be called inside the select emulation via -[EmacsView
windowDidDeminiaturize:] for example.

With multiple Lisp threads, select causes thread switching.  So, Lisp
evaluations can simultaneously happen both on the main thread (via
-[EmacsView windowDidDeminiaturize:]) and on another Lisp thread.
This breaks the cooperative nature of the Emacs threads.

				     YAMAMOTO Mitsuharu
				[email-masked]