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

Method AsyncProducer

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

Source from the content-addressed store, hash-verified

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