Frage

Is it possible to create an object that will support epoll()?

I assume the epoll_* system calls depending on a compatible system fd makes it difficult, if not impossible, to create an object with a compatible 'pseudo fd'- but thought I'd see if I was wrong. ( it happens :p )

War es hilfreich?

Lösung

Have the object write to one side of a pipe(2), and pass the other end to epoll.register(). Obviously the object can't run in the same thread and at the same time as epoll.poll(). But that still leaves other valid usescases.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top