Adapt to the new multithreaded API.