3 ms·
Function coloring
by pulse7 4y ago
Function coloring
- andix 4y agoAsync/await doesn’t change anything there. It just makes it easier to deal with.
- justoreply 4y agoWith the new thread model in java (project Loom) you don't need function coloring
- andix 4y agoI don't know the details. But a synchronous function returns a value and an async function returns something promise-like (it completes at some point and returns a value or an error). You can always call something async synchronously (by waiting for finishing). Or something synchronous in an async way (by putting it onto another thread). But there is no way to completely remove this fact from the eyes of the programmer. async/await is one of the ways to make it easier to read or write.