News for hackers. Stuff that matters.
Re:Postgres indexes under the hood by MaxBarraclough on Monday January 29, 2018 @07:43AM (#16257129)
You've mentioned an abstraction but not explained why it's leaky.

I agree that async/await leaks in places, such as in the surprising deadlocks that Stephen Cleary explains. I've met more than one pretty serious C# developer that wasn't aware of this. http://blog.stephencleary.com/2012/07/dont-block-on-async-co...

> the question is whether it is part of the API and explained or not

More broadly it's a question of pretending things can be wrapped up in tidy self-contained entities, and the idea that we can fully design away the messy details of reality. See also the Three Big Lies of C++ https://youtu.be/rX0ItVEVjHc?t=17m15s

Re:Postgres indexes under the hood by amirouche on Tuesday January 30, 2018 @08:44AM (#16265173)
My understanding is that async/await gives the promise to write asynchronous code like synchronous code. Except the use of 'await' it's true.
Re:Postgres indexes under the hood by MaxBarraclough on Tuesday January 30, 2018 @09:28AM (#16265516)
All told I'd say it's an successful but imperfect abstraction. I've been very impressed by it all in all. Concurrent programming isn't easy, and it's not a silver bullet, but it's a great language feature.

In an ideal world you'd just take existing synchronous code and throw async/await keywords at it to make it async. The abstraction isn't quite that successful, of course.

See Stephen Cleary's AsyncEx library, which provides async-specific functionality such as AsyncLock, which doesn't exist in the standard library. https://github.com/StephenCleary/AsyncEx/wiki/AsyncLock