3 ms·
> How will you avoid having two variants of each and every lib ? E.g. redis-rs, sync, and redis-tokio, async ? By having one, the async one. If someone doesn't
by dbaupp 10y ago
> How will you avoid having two variants of each and every lib ? E.g. redis-rs, sync, and redis-tokio, async ?
By having one, the async one. If someone doesn't care about asynchronicity, there's always some sort of "wait until completion" functionality. (This is practically what the "normal" synchronous IO functions are doing anyway, just internally.)
- zzzcpan 10y agoThis is actually what Go got very wrong. They implemented net completely synchronously, instead of doing it in an event loop and providing synchronous wrappers that communicate with that event loop for those who need them.
- fooyc 10y agoMy point is exactly that this is what they got right