Simple emulation of multi-threading in JS.