Open ricardoekm opened 5 years ago
The coding idioms to deal with the single-thread javascript environment have evolved over time from callbacks to promises to async/await.
async/await offers an elegant code solution to implement async code as it were synchronous, making the code easier to understand and avoiding callback hells.
https://github.com/ricardoekm/Kyrix/blob/0ce6879a307f1d16440ef79fa978d9dc529020a2/compiler/src/index.js#L729-L764
The coding idioms to deal with the single-thread javascript environment have evolved over time from callbacks to promises to async/await.
async/await offers an elegant code solution to implement async code as it were synchronous, making the code easier to understand and avoiding callback hells.
https://github.com/ricardoekm/Kyrix/blob/0ce6879a307f1d16440ef79fa978d9dc529020a2/compiler/src/index.js#L729-L764