Closed vincentleung58 closed 7 years ago
When pyq is running in Python REPL mode (started using the pyq executable), it blocks kdb+ event loop that is responsible for dispatching asynchronous messages. If you want to use asynchronous calls, you need to call Python from a regular kdb+ instance as follows:
q)p)h = q.hopen('::5000')
q)p)h.neg(('.u.upd', 'tbl', (["a","b","c"], [1,2,3])))
Please also note that you should avoid using low level methods that start with an underscore directly. As shown above, you can rely on PyQ to automatically convert Python objects to K instances when they are passed to the handle.
I'm building a Python-based feedhandler. I start in a q session with the following
I then run the following script from PyQ
This successfully add the records into the host environment table "tbl".
If I run the asynchronous call handle, however
The table is not updated.
If I run the synchronous call again,
It seems that PyQ is caching my asynchronous call somewhere. Am I doing something wrong?