JavaScript concurrency model