Using chunked API in multi-threaded example