-
-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use native POSIX polling syscalls to read input #624
Conversation
0077c05
to
63289c6
Compare
@lvxnull But I do believe the interrupt flag will still be needed as a way to signal that the next call to |
@aristocratos
No, because |
Neat 👍🏼 Nice improvement over the previous mess! Will do some stability testing on all platforms when I've got some time. |
Also is there a reason to use |
63289c6
to
3486d80
Compare
Yes. |
Can you update the declaration of |
3486d80
to
5f089e2
Compare
done |
No more awkward manual polling
5f089e2
to
b8e43d9
Compare
This will decrease the amount of thread synchronization calls during input processing and memory usage by removing the dedicated input thread and moving input reading code into the main thread, in polling read mode(non-canon, VMIN and VTIME set to 0), as well as replace the manual, sleep based polling implementation with
pselect
. Because polling is now done bypselect
,SIGUSR1
will be used as the interrupt flag.Additionally, input will be read in chunks instead of character by character.