From: Zhang Haijun <ccsmile2008@outlook.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "25214@debbugs.gnu.org" <25214@debbugs.gnu.org>
Subject: bug#25214: #25214 26.0.50; Interacting with user from threads other than the primary
Date: Thu, 7 Feb 2019 01:39:54 +0000 [thread overview]
Message-ID: <PS1PR06MB275990CE5DFE9F68C2EB06DCA8680@PS1PR06MB2759.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <83zhr8sz5a.fsf@gnu.org>
> 在 2019年2月6日,下午11:41,Eli Zaretskii <eliz@gnu.org> 写道:
>
>> From: Zhang Haijun <ccsmile2008@outlook.com>
>> Date: Wed, 6 Feb 2019 06:58:44 +0000
>>
>> Every inputting request from other threads can be treated like an email.
>
> The problem is in receiving the input into Emacs in the first place.
> It has to be done by some thread, not necessarily the one that is
> executing when input arrives. So we are back to square one.
>
> Thanks.
What about the following:
1. Create a fd to receive the input request event. This fd can only be watched by main thread or a special keybord sheduler thread.
2. If a thread need input, it sends an input request event(containning its thread id, prompt …) to the fd and then goto background.
3. The main thread(or keyboard sheduler thread) receives the event and put it into in-box and show a notification to user.
4. User opens the in-box and selects a request. Emacs switches to the thread.
I’m not too familar with emacs’ internal. Maybe I’m wrong.
next prev parent reply other threads:[~2019-02-07 1:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-16 15:17 bug#25214: 26.0.50; Interacting with user from threads other than the primary Eli Zaretskii
2016-12-19 4:31 ` Clément Pit--Claudel
2018-09-17 14:06 ` Michael Albinus
2018-09-17 18:41 ` Eli Zaretskii
2018-09-17 19:11 ` Eli Zaretskii
2018-09-18 8:29 ` Michael Albinus
2018-09-18 8:34 ` Eli Zaretskii
2018-09-27 16:15 ` Michael Albinus
2018-09-27 16:20 ` Eli Zaretskii
2018-09-28 11:09 ` Michael Albinus
2018-09-18 8:21 ` Michael Albinus
2018-09-18 12:33 ` Eli Zaretskii
2019-02-06 6:58 ` bug#25214: #25214 " Zhang Haijun
2019-02-06 15:41 ` Eli Zaretskii
2019-02-07 1:39 ` Zhang Haijun [this message]
2019-02-07 14:29 ` Eli Zaretskii
2019-02-07 14:56 ` Zhang Haijun
2019-02-07 17:25 ` Eli Zaretskii
2019-02-08 2:42 ` Zhang Haijun
[not found] ` <D55AF9DD-D8D2-4A59-AE6D-24B597A164C1@outlook.com>
2019-02-07 13:49 ` Zhang Haijun
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PS1PR06MB275990CE5DFE9F68C2EB06DCA8680@PS1PR06MB2759.apcprd06.prod.outlook.com \
--to=ccsmile2008@outlook.com \
--cc=25214@debbugs.gnu.org \
--cc=eliz@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.