examples/thread.html
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript" src="../AsyncUtils.js"></script>
<script>
var thread = new AsyncUtils.Thread(function() {
var i = 0;
while(i < 10000000000) {i++};
return 'Some Result';
});
thread.start().exec().then(function(result) {
console.log(result);
});
</script>
</body>
</html>