[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #25793 [Core Tor/Tor]: Refactor refactored token bucket API to be more generic



#25793: Refactor refactored token bucket API to be more generic
---------------------------------+------------------------------------
 Reporter:  nickm                |          Owner:  nickm
     Type:  defect               |         Status:  needs_review
 Priority:  Medium               |      Milestone:  Tor: 0.3.4.x-final
Component:  Core Tor/Tor         |        Version:
 Severity:  Normal               |     Resolution:
 Keywords:  034-roadmap-subtask  |  Actual Points:
Parent ID:  #25373               |         Points:
 Reviewer:  dgoulet              |        Sponsor:  Sponsor8-can
---------------------------------+------------------------------------

Comment (by dgoulet):

 So hmmm, for anyone to implement a token bucket, they would need to create
 a specialized version? The `token_bucket_raw_reset()` API function has the
 `token_bucket_timestamp_t` as a param which means any specialized token
 object will kind of need to use that timestamp struct? Or not use the raw
 reset?

 Where `token_bucket_raw_refill_steps()` only takes "steps" which means
 that if one would use the token bucket API without creating a new object,
 it would need to compute that steps value on its side instead of within a
 `token_bucket_t` API?

 In other words, the implementation using the token bucket will always need
 to keep the last refilled time or create a specialized object?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25793#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs