-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(mux) use RWMutex #218
Conversation
i dont think that was mine? maybe. |
Uhmm.... dont do that. RWMutexes Standard lock operation takes twice as long as a normal mutex. The only proper use case for it is frequent reads with infrequent writes, GetBandwidth will be called rather infrequently. |
confusing branch name too, lol. Today is still the 27th... |
Ah. I didn't know that.
And (omg), I started naming branches 2014-10-28 last night. |
reverted |
@whyrusleeping where did you get this stat from?
watch this not be true later on :] maybe add a note referencing this conversation. |
Take a look at the source: RWMutex: Mutex: And also run some benchmarks. |
Also, unless we are checking the bandwidth way more often than we are receiving a packet, this will still hold true. |
docs: duplicate pkg documentation
@jbenet