diff options
| author | Po Lu | 2023-06-10 09:21:48 +0800 |
|---|---|---|
| committer | Po Lu | 2023-06-10 09:21:48 +0800 |
| commit | 674373bed8632093ab8ed118618b05e085ffd5cd (patch) | |
| tree | bcdc1ed05206c423c8746ea593bee52560542030 /src/android.h | |
| parent | 8cbe35a84621edf4dd7cc71d6a6ae7e55699fc5a (diff) | |
| download | emacs-674373bed8632093ab8ed118618b05e085ffd5cd.tar.gz emacs-674373bed8632093ab8ed118618b05e085ffd5cd.zip | |
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'.
Diffstat (limited to 'src/android.h')
| -rw-r--r-- | src/android.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/android.h b/src/android.h index c748d99a09a..8634ba01a3d 100644 --- a/src/android.h +++ b/src/android.h | |||
| @@ -185,7 +185,7 @@ extern void android_display_toast (const char *); | |||
| 185 | 185 | ||
| 186 | /* Event loop functions. */ | 186 | /* Event loop functions. */ |
| 187 | 187 | ||
| 188 | extern void android_check_query (void); | 188 | extern void android_check_query_urgent (void); |
| 189 | extern int android_run_in_emacs_thread (void (*) (void *), void *); | 189 | extern int android_run_in_emacs_thread (void (*) (void *), void *); |
| 190 | extern void android_write_event (union android_event *); | 190 | extern void android_write_event (union android_event *); |
| 191 | 191 | ||