News for hackers. Stuff that matters.
Re:In Defense of Async: Function Colors Are Rusty by nicoburns on Wednesday January 05, 2022 @07:47PM (#29817556)
parking_lot is a mutex. slab is a slab allocator. It seems to me that in a C or C++ project you’d have everyone writing their own rather than a shared project that everyone depends on.

Personally I have much more confidence in the community de facto standard implementation of something than I do in the half-baked version that someone writes themselves to avoid pulling in a dependency.

Re:In Defense of Async: Function Colors Are Rusty by platinumrad on Wednesday January 05, 2022 @07:54PM (#29817607)
Personally I think it's a good thing when my hello world program is vulnerable to 65 different supply chain attacks.
Re:In Defense of Async: Function Colors Are Rusty by nonameiguess on Wednesday January 05, 2022 @08:07PM (#29817709)
Not sure why a C project would do that from scratch. libc includes that functionality, so you already get it for free in any POSIX system. In Windows, I'm sure the system C library provides the same stuff.
Re:In Defense of Async: Function Colors Are Rusty by nicoburns on Wednesday January 05, 2022 @08:43PM (#29818024)
Perhaps not those things, but I see lots of C projects with custom hash map implementations, etc.
Re:In Defense of Async: Function Colors Are Rusty by gpderetta on Friday January 07, 2022 @07:54AM (#29838546)
I don't think parking_lot is a mutex. It is more similar to a futex, i.e. an ephemeral wait queue. You can use it to implement a mutex, but that's just one use case.