top | item 9981417 (no title) efxzsh | 10 years ago Hmm, ok but why notfunction asyncParse(string) { return new Promise(function(res, rej) { resolve(JSON.parse(string)); }); }- or -let asyncParse = async (string) => JSON.parse(string); discuss order hn newest alt_|10 years ago Promises still run in the main thread and will block other javascript. The purpose of this hack is to move the parsing out of the main thread. efxzsh|10 years ago Ok, get it. Thx
alt_|10 years ago Promises still run in the main thread and will block other javascript. The purpose of this hack is to move the parsing out of the main thread. efxzsh|10 years ago Ok, get it. Thx
alt_|10 years ago
efxzsh|10 years ago