[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User interaction from multiple threads
From: |
Tom Tromey |
Subject: |
Re: User interaction from multiple threads |
Date: |
Sat, 25 Aug 2018 10:16:06 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) |
>>>>> "Eli" == Eli Zaretskii <address@hidden> writes:
Tom> This was what I'd planned to do in the past but never got around to. A
Tom> first step would be to make a new thread for each terminal and arrange
Tom> for the terminal's file descriptor to be thread-locked. This didn't
Tom> seem very hard. Once that's done I guess higher-level problems could be
Tom> looked into; I don't really know this area well though.
Eli> Please describe the proposed solution in more detail, because I'm not
Eli> sure I understand it. By "new thread" do you mean a Lisp thread of
Eli> the kind made by make-thread, which will run only after it succeeds in
Eli> grabbing the global lock? Or do you mean some other kind of thread?
Yes, the first step is to make a lisp thread for a new tty terminal, and
change init_tty and/or add_keyboard_wait_descriptor to thread-lock the
new file descriptor. I don't know what comes after this, since I don't
know much about how the top level works.
I think the GIL doesn't matter much here (though I also think Emacs
should revisit the idea of periodic GIL releases) because waiting for
I/O releases it. It seems to me that different terminals ought to be
independent, and if I'm, say, in the middle of entering a key sequence
in an X frame, that shouldn't block any sort of action in a tty frame.
Tom
- Re: User interaction from multiple threads, (continued)
- Re: User interaction from multiple threads, hw, 2018/08/28
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/29
- Re: User interaction from multiple threads, hw, 2018/08/29
- Re: User interaction from multiple threads, Uday S Reddy, 2018/08/29
- Re: User interaction from multiple threads, Richard Stallman, 2018/08/26
- Re: User interaction from multiple threads, Tom Tromey, 2018/08/22
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/22
- Re: User interaction from multiple threads,
Tom Tromey <=
- Re: User interaction from multiple threads, martin rudalics, 2018/08/22
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/22
- Re: User interaction from multiple threads, Gemini Lasswell, 2018/08/21
Re: User interaction from multiple threads, Uday Reddy, 2018/08/29