mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-04 06:00:30 +00:00
[input] drain input readiness pipe on clearing input buffer #2216
This commit is contained in:
parent
81e360e500
commit
f6b06c3bfd
@ -2093,6 +2093,12 @@ internal_get(inputctx* ictx, const struct timespec* ts, ncinput* ni){
|
||||
bool sendsignal = false;
|
||||
if(ictx->ivalid-- == ictx->isize){
|
||||
sendsignal = true;
|
||||
}else if(ictx->ivalid){
|
||||
logtrace("draining event readiness pipe\n");
|
||||
char c;
|
||||
while(read(ictx->readypipes[0], &c, sizeof(c)) == 1){
|
||||
// FIXME accelerate;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&ictx->ilock);
|
||||
if(sendsignal){
|
||||
|
Loading…
Reference in New Issue
Block a user