MCPcopy Create free account
hub / github.com/apache/arrow / AsyncProducer

Method AsyncProducer

cpp/src/arrow/c/bridge.cc:2718–2731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2716 };
2717
2718 AsyncProducer(DeviceAllocationType device_type, struct ArrowSchema* schema,
2719 struct ArrowAsyncDeviceStreamHandler* handler)
2720 : handler_{handler}, state_{std::make_shared<State>()} {
2721 state_->producer_.device_type = static_cast<ArrowDeviceType>(device_type);
2722 state_->producer_.private_data = reinterpret_cast<void*>(state_.get());
2723 state_->producer_.request = AsyncProducer::request;
2724 state_->producer_.cancel = AsyncProducer::cancel;
2725 handler_->producer = &state_->producer_;
2726
2727 if (int status = handler_->on_schema(handler_, schema) != 0) {
2728 state_->error_ =
2729 Status::UnknownError("Received error from handler::on_schema ", status);
2730 }
2731 }
2732
2733 struct PrivateTaskData {
2734 PrivateTaskData(std::shared_ptr<State> producer, std::shared_ptr<RecordBatch> record)

Callers

nothing calls this directly

Calls 3

UnknownErrorFunction · 0.85
getMethod · 0.45
on_schemaMethod · 0.45

Tested by

no test coverage detected