book-exploring-async-basics icon indicating copy to clipboard operation
book-exploring-async-basics copied to clipboard

[Translation] 8_3_timers.md

Open Jaxx4Fun opened this issue 5 years ago • 1 comments

You can iterate over the range but due to the ownership rules you can't remove them at the same time, and we want to remove the timers, we've run.

the last comma I think should be replaced by which or that?

or in the case if it has a timeout of 0 they will be invoked immediately as you'll see next.

so the callbacks of timers which have already timed out are immediately schedule to run. From my perspective, this sentence is a little misleading: before I checked the code, I had thought the callbacks would be executed in function process_expired_timers

Jaxx4Fun avatar Jun 23 '20 17:06 Jaxx4Fun

the last comma I think should be replaced by which or that?

Yeah, you're right.

so the callbacks of timers which have already timed out are immediately schedule to run. From my perspective, this sentence is a little misleading: before I checked the code, I had thought the callbacks would be executed in function process_expired_timers

I agree the sentence is not very good, but I feel if you read the whole paragraph it's not that unclear either. I'll take a look at it and see if there is anything worth changing.

cfsamson avatar Jun 23 '20 18:06 cfsamson