I am writing a shared library routine in C to convert some bulk data
(in HDF5) and construct a K object in a separate thread before passing
it on to q. According to https://code.kx.com/trac/wiki/Cookbook/InterfacingWithC,
memory is managed from the thread an object is constructed in, so it
doesn’t seem like I can pass a K object created in one thread to the
main q instance via k(). Is there a way to do this, or do I need to
rewrite this as a separate process and communicate over a socket with
the main q instance? I would like to use a shared library because I
don’t have to deal with function dispatch and can make synchronous
calls. Looking at the documentation, it sounds like an external C
process can only receive asynchronous requests using r = k(c,(K)0),
but not return a value.
Thanks in advance as always.