bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25214: #25214 26.0.50; Interacting with user from threads other than


From: Zhang Haijun
Subject: bug#25214: #25214 26.0.50; Interacting with user from threads other than the primary
Date: Thu, 7 Feb 2019 14:56:22 +0000


> 在 2019年2月7日,下午10:29,Eli Zaretskii <eliz@gnu.org> 写道:
> 
> How do you "send input request to the fd"?  A program cannot both read
> and write to the same fd within the same process, at least not
> portably.
> 

Sorry for my poor English and poor expression. I mean a data channel, for 
example a pair of fd created by pipe() or a pair of sockets created by 
socketpair(). producer-consumer model.

> If another thread writes to some fd, it means the main thread is not
> running, so it cannot receive the event, even if we did find the way
> of having an fd which can be read by one thread and written by all the
> others.

Another thread send a input request and then be blocked on a lock(for example, 
keybord lock, one lock per thread). The main thread(or keybord sheduler thread) 
then can wake up one thread and give keybord to it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]