Implemented threaded processing.