Threads implementation for the browser, using the WebWorker API