4 ms·
Yeah, I think it might be a familiarity bias. Anyway, the point of access requesters are that they are much safer than manually protecting resources with mutex
by duneroadrunner 9y ago
Yeah, I think it might be a familiarity bias.
Anyway, the point of access requesters are that they are much safer than manually protecting resources with mutexes. That is, using access requesters eliminates the possibility of data races[1]. Which is important because data races can be particularly insidious bugs.
Just like how smart pointers can improve safety by automatically managing object lifetimes, access requesters can improve safety by automatically managing object lifetimes and asynchronous access.
[1] As long as you adhere to the rule that shared objects not have "unprotected" mutable or indirect (i.e. pointers/references) members.