]> git.eshelyaron.com Git - emacs.git/commit
Prevent hangs from IM requests with the main thread busy
authorPo Lu <luangruo@yahoo.com>
Sat, 10 Jun 2023 01:21:48 +0000 (09:21 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 10 Jun 2023 01:21:48 +0000 (09:21 +0800)
commit674373bed8632093ab8ed118618b05e085ffd5cd
treebcdc1ed05206c423c8746ea593bee52560542030
parent8cbe35a84621edf4dd7cc71d6a6ae7e55699fc5a
Prevent hangs from IM requests with the main thread busy

* src/android.c (android_select): Clear `android_urgent_query'.
(android_check_query): Make static.  Clear
`android_urgent_query'.
(android_check_query_urgent): New function; work like
`android_check_query', but only answer urgent queries.
(android_answer_query, android_end_query): Clear urgent query
flag.
(android_run_in_emacs_thread): Initially wait two seconds for
the query to run from the keyboard loop; upon a timeout, set
`android_urgent_query' to true and wait for it to run while
reading async input.
* src/android.h: Update prototypes.
* src/keyboard.c (handle_async_input): Call
`android_check_query_urgent'.
src/android.c
src/android.h
src/keyboard.c