geky/equeue

Delay/period as first argument in event_call_*

Closed this issue · 2 comments

event_call_in and event_call_every take as their last argument the delay or the period, in milliseconds. I believe it would be better if they took the delay/period as their first argument because it would make the call marginally clearer, but more importantly because it would simplify the implementation. Aside from being useful, this library seems educational, and a simpler implementation should help both goals.

geky commented

This is good reasoning to me.

Just to note, the original motivation was to match these APIs:

But your reasoning makes me think it is worth changing.

An aside, I've been marking 0.x releases everytime a backwards-incompatible change is introduced. The API will still be under flux until 1.0, but this should help avoid issues with instability.

geky commented

On master, delay and period should now be the first arguments for event_call_*. Feel free to reopen if you still have concerns.