I need to add timers support in an application based on I/O Completion Ports (IOCP). I would like to avoid the use of a specific thread to manage timers.
On Linux, you can create a timer that delivers expiration notifications via a file descriptor (see timerfd.h man), so it's great to use it for example with epoll if your application is based on epoll.
On Windows, you can use "waitable timers" with an asynchronous procedure call (ACP) (see http://msdn.microsoft.com/en-us/library/ms686898(v=VS.85).aspx)
If you are interested, kqueue (BSD, Mac OS) supports timers by default (see EVFILT_TIMER).
With I/O Completion Ports, we have to use objets that support overlapped I/O. So, is there such a timer for IOCP ?
Best regards,
Cédrics