quininer / ritsu

An experimental asynchronous runtime based on `io-uring`.
MIT License
76 stars 4 forks source link

Fix Timer #13

Closed quininer closed 4 years ago

quininer commented 4 years ago

The current implementation of Timer cannot delay enough time, we may need to use timerfd.

CarterLi commented 4 years ago

You mean IORING_OP_TIMEOUT won't delay enough time? What's the problem?

quininer commented 4 years ago

off may contain a completion event count. If not set, this defaults to 1. A timeout will trigger a wakeup event on the completion ring for anyone waiting for events. A timeout condition is met when either the specified timeout expires, or the specified number of events have completed.

We don't want completed events to affect timeout.

CarterLi commented 4 years ago

you may set off=0

https://github.com/axboe/liburing/issues/18

quininer commented 4 years ago

Ha, this is very useful! I think the document of liburing needs to be updated.

CarterLi commented 4 years ago

never trust the document. source code is the best document.

quininer commented 4 years ago

Thank for your help.