Simple threading test for Javascript