Add support for asyncio
It should be possible to implement an asyncio event loop based on kdb+ sd1/sd0. Once such an event loop is available, it should be straightforward to implement asynchronous calls from q to Python.
so if a message came in on .z.ps, how might code look from handling that message to returning a response - using asyncio?
You can see some simple examples in the Python Manual. Ideally something like
p)async def hello_world(x):'
await asyncio.sleep(10)
print("Hello World!")
.z.ps:.p.callable .p.pyeval"hello_world"
would result in "Hello World!" printed on the server console 10 seconds after each client message, but will not block the client.
@jhanna-kx @jfakx - Is there any way to expose the sd1/sd0 handlers like in C so that python can run threaded work and push results back into the Q session?