Replies: 4 comments
-
Fixing compilation errors is easy: https://github.com/Giorgi/DuckDB.NET/tree/Table-Function-Async-Callback It doesn't work at runtime though. DuckDB throws this error:
The reason it's happening is that One workaround that I can think of (but I don't like it) is making the Bind callback void and using the same |
Beta Was this translation helpful? Give feedback.
-
I haven't looked at the source code yet. I keep forgetting this is interop with In the meantime I wrote a demo of how to use the legacy So this is at the consuming side rather than your api side. I'm sure you remember how we were all told not to block on asynchronous calls when That said, and I am no internals expert, but I think the |
Beta Was this translation helpful? Give feedback.
-
Adding my 2 cents, I've also trying to utilize In fact my case is even more complicated because data reader is pushed to a callback, smth like
To use this API with synchronous |
Beta Was this translation helpful? Give feedback.
-
I have come to the same conclusion. |
Beta Was this translation helpful? Give feedback.
-
(Discussed in Discord. Formalizing as an Issue so someone can work on it. Is a nice-to-have.)
The following code using an async lambda within
RegisterTableFunction
does not compile under v1.1.3:The error is
Giorgi mentioned it is a limitation of the C api within which the callback is executed and maybe that is a hard limit. But perhaps someone can find an implementation that allows for non-blocking awaits.
Beta Was this translation helpful? Give feedback.
All reactions