openMSX
|
Polls for events on a given file descriptor. More...
#include <Poller.hh>
Public Member Functions | |
Poller () | |
~Poller () | |
bool | poll (int fd) |
Waits for an event to occur on the given file descriptor. More... | |
bool | aborted () |
Returns true iff abort() was called. More... | |
void | abort () |
Aborts a poll in progress and any future poll attempts. More... | |
Polls for events on a given file descriptor.
It is possible to abort this poll from another thread. This class exists because in POSIX there is no straightforward way to abort a blocking I/O operation.
void openmsx::Poller::abort | ( | ) |
Aborts a poll in progress and any future poll attempts.
Definition at line 31 of file Poller.cc.
Referenced by openmsx::CliConnection::end(), openmsx::SocketConnection::output(), openmsx::MidiInReader::unplugHelper(), and openmsx::RS232Tester::unplugHelper().
|
inline |
bool openmsx::Poller::poll | ( | int | fd | ) |