Better HN
topnewbestaskshowjobs
Log inSign up

franke2

3 karma · joined Aug 31, 2022 (4y ago) · 4 submissions

Submissions

comment 3y ago · link · parent

> abused oauth permissions to take over the email accounts of their users

Woah, never knew this. Do you have any reference? I cannot find anything about it.

comment 3y ago · link · parent

Even if very similar, I prefer the MutexedObj class described in those two articles

https://fekir.info/post/extend-generic-thread-safe-mutexed_o...

https://fekir.info/post/sharing-data-between-threads/#_bind-...

In particular it explains why providing getters or operator* like some other implementation do (not in this case) is not a feature, and it does not use multiple classes (like the linked implementation of SerenityOS does) making the implementation simpler.

Also the "simple" implementation is just 20 lines of code...