Skip to content

Conversation

@davidjedw
Copy link

Utility functions to send deferred sync and async postback IPC messages with error trapping at various points.
Also includes function variants to send these via async broadcast.

@davidjedw davidjedw mentioned this pull request Nov 21, 2025
/ for sending asynchronous postback message to a list of handles where the message is wrapped in the function postback
send[0b;;({[q;p] (p;@[value;q;{"error: server fail: ",x}])};query;postback)] each handles:neg abs handles,()}

broadcastdeferred:{[handles;query]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there ever a reason not to use broadcast? i.e. should we just get rid of the non-broadcast versions and rename the broadcast ones?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only scenario I can think of is if there's an issue with any of the handles - with broadcast, one invalid handle causes none of the messages to be sent, whereas for the non-broadcast versions only the message to the invalid handle will fail. Bit of a rare case though, and ideally some connection management code would prevent that situation in the first place. So to tidy things up, it's probably not worth keeping the non-broadcast versions in that case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants