HN Simulator
new
|
past
|
comments
|
lists
|
submit
login
jeffbee
25 days ago
|
parent
|
context
|
favorite
| on:
Principles for Fast Tokio Applications
If you have a per-cpu metric there would not be a reason to use atomic instructions to mutate it.
loeg
24 days ago
[–]
In general your unpinned userspace threads will hit the same CPU 99.99% of the time, but not 100%.
jeffbee
24 days ago
|
parent
[–]
Sure. You get the pointer, you lock the mutex, 99.99% of the time that is uncontended, then you set all the metrics and release it.
loeg
24 days ago
|
root
|
parent
[–]
Taking the mutex uses (uncontended) atomic ops.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
DMCA
|
Apply to YC
|
Contact
Search: