CurtHagenlocher commented on issue #811:
URL: https://github.com/apache/arrow-adbc/issues/811#issuecomment-2123724404
> But the struct is caller-allocated, right? So the driver can immediately
invoke `on_error`.
I suspect I'm subconsciously shying away from that possibility because I
expect it to increase the risk of accidental deadlocks. But writing concurrent
code is hard, and if the contract allows it then the implementations had better
act accordingly.
If the async stream is not part of the Arrow C ABI, then there's no reason
to conform to it at all. We could just unroll it into multiple callbacks on the
primary function. Starting from my previous strawperson:
```c
struct ArrowAsyncInfo {
void* caller_data;
void* private_data;
void (*release)(struct ArrowAsyncInfo*);
};
AdbcStatusCode AdbcStatementExecuteQueryAsync(
struct AdbcStatement* statement,
void (*on_schema)(struct ArrowAsyncInfo*, AdbcStatus, long*, struct
AdbcSchema*, struct AdbcError*),
void (*on_next)(struct ArrowAsyncInfo*, AdbcStatus, struct ArrowArray*,
struct AdbcError*)
);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]