| 515 | } |
| 516 | |
| 517 | Future<std::shared_ptr<StreamingReader>> StreamingReader::MakeAsync( |
| 518 | std::shared_ptr<io::InputStream> stream, const ReadOptions& read_options, |
| 519 | const ParseOptions& parse_options, const io::IOContext& io_context, |
| 520 | Executor* cpu_executor) { |
| 521 | auto future = StreamingReaderImpl::MakeAsync( |
| 522 | std::make_shared<DecodeContext>(parse_options, io_context.pool()), |
| 523 | std::move(stream), io_context, cpu_executor, read_options); |
| 524 | return future.Then([](const std::shared_ptr<StreamingReaderImpl>& reader) { |
| 525 | return std::static_pointer_cast<StreamingReader>(reader); |
| 526 | }); |
| 527 | } |
| 528 | |
| 529 | Result<std::shared_ptr<StreamingReader>> StreamingReader::Make( |
| 530 | std::shared_ptr<io::InputStream> stream, const ReadOptions& read_options, |