izuki
8/31/2017 - 6:52 AM

ノンブロッキングな処理とはなにか?

ノンブロッキングな処理とはなにか?

// non-blocking
setTimeout(function() {
	console.log("hello");
},1000);
console.log("world");
*/

// blocking
var start = new Date().getTime();
while (new Date().getTime() < start + 1000);
console.log("world");