Add threadpool support for js rendering.