Loading ...
Sorry, an error occurred while loading the content.

wrappers for poll() and select()

Expand Messages
  • Dan Kegel
    Fred Cheng and I turned Poller into an abstract base class, moved the existing poll()-based implementation into class Poller_poll, and added a new
    Message 1 of 1 , Sep 6, 2000
    • 0 Attachment
      Fred Cheng and I turned Poller into an abstract base class,
      moved the existing poll()-based implementation into class Poller_poll,
      and added a new select()-based implementation.
      (Yes, this could just as well have been done in C and/or
      with #ifdef's.)
      Along the way, we cleaned Poller.h up a bit.

      Future interface changes I'd like to do include
      getting rid of all the 'virtual' keywords, and turning
      getNextEvent into getEvents, where you specify an
      array of event structs, not just one.

      Fred and I hope to write a /dev/poll-based implementation
      of Poller, and do some microbenchmarking, to see how
      poll(), select(), and /dev/poll stack up against each other.

      At Michael Elkins' suggestion, I'll include a microbenchmark
      showing the cost of changing the event mask frequently,
      since we expect that to be a common situation.

      The new code is at http://www.kegel.com/dkftpbench/ as
      version 0.13 of the tarball. The benchmark doesn't use
      Poller yet.

      - Dan
    Your message has been successfully submitted and would be delivered to recipients shortly.