omerk/pihwm — pull request #4 by marcparadise (2014-11-01 02:45:36+00:00)
Title: do not poll stdio when monitoring for gpio edge activity

When this library is used with Erlang port applications, the polling and consumption of input on stdin from `isr_handler` would put that application into contention with erlang's port protocol, which sends all input to stdin of the connected process of the port. After one or more `lsr_handler` threads were created, eventually a subsequent request sent from Erlang to the process over stdin would be captured in the lsr_handler polling instead of the connected process's stdin loop.

I was not able to find any reason to capture stdin while polling for gpio edge activity in `lsr_handler` (and I could see additional problems coming of it when using multiple interrupts). Removing it resolved the issue with communications with erlang described above. Assuming this was left over from an earlier iteration or some kind of debugging, would it be possible to merge this change in?