Displaying 1 result from an estimated 1 matches for "shut_down".
Did you mean:
_shutdown
2012 Oct 12
0
NUT drivers socket polling issues
...;d like
to discuss in implementation of socket polling in
driver/main.c::main and driver/dstate.c::dstate_poll_fds
My observations follow:
1/ I'm not very happy with the poll mechanism design as whole.
I mean, typically, you implement the poll as { poll(); process(); }*
loop; in pseudo-code:
shut_down = false;
fd_set.init(...);
timeout.set(...);
while (!shut_down) {
status = poll(fd_set, timeout);
switch (status) {
case POLL_ERROR:
// Handle error ...
break;
case POLL_TIMEOUT:
// Handle timeout ...
timeout.set(...