[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #23552 [Core Tor/Tor]: We don't need to log our scheduler type so often
#23552: We don't need to log our scheduler type so often
--------------------------+------------------------------------
Reporter: pastly | Owner: pastly
Type: defect | Status: needs_review
Priority: Medium | Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: tor-sched | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+------------------------------------
Comment (by dgoulet):
Seem this comment is wrong or misplaced:
{{{
+/** Scheduler type, we build an ordered list with those values from the
+ * parsed strings in Schedulers. The reason to do such a thing is so we
can
+ * quickly and without parsing strings select the scheduler at anytime.
*/
+typedef enum {
}}}
I'm a bit worried here with the use of `SCHEDULER_NONE = 0`, not that it
is logically wrong but because it is the "default type" that any scheduler
object will get with a static initialization or `tor_malloc_zero()` that
is 0. It just seems semantically weird to have this option... This is why
in the first place, I started the first type at 1 so if you forget to set
the type, some validation should catch it (well validation we don't have
but you get the concept :P).
Anyway, no strong opinion if nickm is fine with this approach. Else, we
can just make `old_scheduler_type` a int, set it to -1 and we are for sure
certain that it can't be a scheduler type never ever.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23552#comment:6>
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