Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
magicalhippo
28 days ago
|
parent
|
context
|
favorite
| on:
Ditch your mutex, you deserve better
But the mutex encapsulates the int, so if the mutex ensured it occupied a multiple of cache lines, there would be no contention. At the very small cost of a few bytes of memory.
gpderetta
28 days ago
[–]
the mutex forcing alignment would be extremely wasteful. FWIW, I have used 1-bit spin locks.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: