When using different methods (sync/async) to callback a caller process I'm getting an error on different sides:
$ q -p 1234 │$ q
│q)h:hopen`::1234;
│q)neg[h]({.z.w x};42)
q)'type │
│q)neg[h]({neg[.z.w] x};42)
│q)'type
│
│q)neg[h]({neg[.z.w] x};42); h[]
│42
Could you explain this behavior for 1st and 2nd cases please? Why does an exception raize on the 2nd process with the sync callback command .z.w x
, and on the caller with the neg[.z.w]
callback?
And for the 3rd case: is this something like a pattern (or common use case in IPC) to chase async calls with 'sync' handles with empty args h[]
/h(::)
to get the results back making such ad-hock handlers for them?
Upd:
Does blocking receive construct replaces .z.ps/.z.pg
calls?
Upd2: If there exists deferred synchronous - is there something like deferred asynchronous?
Asked about Upd and Upd2 here.