From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
> Date: Thu, 05 Oct 2017 12:27:28 +0900
> From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> Cc: agrambot@g= mail.com,
>=C2=A0 =C2=A0 =C2=A0 =C2=A028630-done@debbugs.gnu.org,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0tom@tromey.com
>
> >>>>> On Wed, 04 Oct 2017 12:23:19 +0300, Eli Zaretskii= <eliz@gnu.org>= said:
>
> >> > OOC, could you please see whether on X the sit-for call = is
> >> > interrupted or not?=C2=A0 That is, do you see the "= there" message
> >> > after typing C-g?
> Same for NS.=C2=A0 Interestingly, some variants of the original recipe=
> behave differently with respect to C-g depending on the toolkit.
>
> Example 1:
>
> (thread-join
>=C2=A0 (make-thread
>=C2=A0 =C2=A0(lambda ()
>=C2=A0 =C2=A0 =C2=A0(message "hello")
>=C2=A0 =C2=A0 =C2=A0(sit-for 2)
>=C2=A0 =C2=A0 =C2=A0(message "there"))))
>
> Interrupted: GTK+, Athena, no toolkit, Mac
> Not interrupted: NS
>
>
> Example 2:
>
> (thread-join
>=C2=A0 (make-thread
>=C2=A0 =C2=A0(lambda ()
>=C2=A0 =C2=A0 =C2=A0(message "hello")
>=C2=A0 =C2=A0 =C2=A0(sleep-for 2)
>=C2=A0 =C2=A0 =C2=A0(message "there"))))
>
> Interrupted: GTK+
> Not interrupted: Athena, no toolkit, Mac, NS
For the record, on MS-Windows, both are interrupted.
> Probably it has something to do with xg_select.
Could be.
The upshot of this is that doing keyboard I/O in non-main threads is
inherently unportable.=C2=A0 Should we mention this in the manual?