Skip to content
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 term with epoll #21

Open
typeless opened this issue Sep 2, 2016 · 0 comments
Open

Use term with epoll #21

typeless opened this issue Sep 2, 2016 · 0 comments

Comments

@typeless
Copy link

typeless commented Sep 2, 2016

We have an application which will open multiple serial ports ('real' serial ports like RS232 or USB CDC/ACM ones) simultaneously. It waits for the first arrival byte to decide which port is going to be selected exclusively for further communications. In the old C implementation, it uses non-blocking I/O to check all the open ports in a spinning loop, which is quite inefficient. Therefore, we would like to use epoll(7) to implement the functionality with the serial port APIs provided by the term package. However, the underlying file descriptor managed by Term, which is needed by epoll, is not exposed.

In summary, we need a way to use epoll or the similar to cooperate pkg/term.

Here is the proposed PR #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant