News for hackers. Stuff that matters.
Re:Non-Blocking Asynchronous JSON.parse Using the Fetch API by efxzsh on Friday July 31, 2015 @08:58AM (#9981417)
Hmm, ok but why not

function asyncParse(string) { return new Promise(function(res, rej) { resolve(JSON.parse(string)); }); }

- or -

let asyncParse = async (string) => JSON.parse(string);

Re:Non-Blocking Asynchronous JSON.parse Using the Fetch API by alt_ on Friday July 31, 2015 @09:03AM (#9981439)
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.
Re:Non-Blocking Asynchronous JSON.parse Using the Fetch API by efxzsh on Friday July 31, 2015 @09:12AM (#9981479)
Ok, get it. Thx