2 ms·
So I work at Facebook and day in and day out use Hack (Facebook's split from PHP) and one thing that's ingrained in the programming model is the async-await mod
by cletus 7y ago
So I work at Facebook and day in and day out use Hack (Facebook's split from PHP) and one thing that's ingrained in the programming model is the async-await model.
PHP/Hack have a model that I think is probably the best overall method for serving HTTP requests in that within the context of a single request, none of the code is multithreaded. I say this is superior because you don't have to worry about race conditions (largely), locking and all that. You might call services that do that but you're insulated from the multithreaded issues of that.
Anyway, knowing that Hack's async-await is strictly cooperative multitasking rather than being multithreaded so you get concurrency and non-blocking I/O without the mental and code cost of threads and locks.
That's why I think it's a big deal.